Change extension unload order to avoid exposing finalisation window (bug 5556, r=asherkin).
This commit is contained in:
parent
b0304a89a6
commit
eaef2a46fb
@ -805,6 +805,13 @@ bool CExtensionManager::UnloadExtension(IExtension *_pExt)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Tell it to unload */
|
||||||
|
if (pExt->IsLoaded())
|
||||||
|
{
|
||||||
|
IExtensionInterface *pAPI = pExt->GetAPI();
|
||||||
|
pAPI->OnExtensionUnload();
|
||||||
|
}
|
||||||
|
|
||||||
/* First remove us from internal lists */
|
/* First remove us from internal lists */
|
||||||
g_ShareSys.RemoveInterfaces(_pExt);
|
g_ShareSys.RemoveInterfaces(_pExt);
|
||||||
m_Libs.remove(pExt);
|
m_Libs.remove(pExt);
|
||||||
@ -899,13 +906,6 @@ bool CExtensionManager::UnloadExtension(IExtension *_pExt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tell it to unload */
|
|
||||||
if (pExt->IsLoaded())
|
|
||||||
{
|
|
||||||
IExtensionInterface *pAPI = pExt->GetAPI();
|
|
||||||
pAPI->OnExtensionUnload();
|
|
||||||
}
|
|
||||||
|
|
||||||
pExt->Unload();
|
pExt->Unload();
|
||||||
delete pExt;
|
delete pExt;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user