Fix how the mark-serial is used.
The mark-serial is a generation number to optimize dependency tracking. It did not actually get applied correctly, meaning that in rare cases we could miss dependencies. This patch removes the incorrect serial propagation and ensures that we don't double-count a dependent plugin. Additionally, this patch ensures that all callers of BindNativeToPlugin() will update the mark serial, as is required to correctly track dependencies.
This commit is contained in:
@@ -1381,6 +1381,7 @@ bool CPluginManager::RunSecondPass(CPlugin *pPlugin, char *error, size_t maxleng
|
||||
|| pOther->GetStatus() == Plugin_Paused)
|
||||
&& pOther != pPlugin)
|
||||
{
|
||||
g_ShareSys.BeginBindingFor(pPlugin);
|
||||
for (size_t i = 0; i < pPlugin->m_fakes.length(); i++)
|
||||
g_ShareSys.BindNativeToPlugin(pOther, pPlugin->m_fakes[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user