Bug 883657, part 1 - Run mozJSComponentLoader::UnloadModules() before the shutdown CC. r=bsmedberg

This commit is contained in:
Andrew McCreight 2013-06-25 08:42:39 -07:00
parent 8cbc01e736
commit 1d9f3a1f64

View File

@ -648,8 +648,6 @@ ShutdownXPCOM(nsIServiceManager* servMgr)
// Release the directory service
NS_IF_RELEASE(nsDirectoryService::gService);
nsCycleCollector_shutdown();
if (moduleLoaders) {
bool more;
nsCOMPtr<nsISupports> el;
@ -675,6 +673,8 @@ ShutdownXPCOM(nsIServiceManager* servMgr)
moduleLoaders = nullptr;
}
nsCycleCollector_shutdown();
PROFILER_MARKER("Shutdown xpcom");
// If we are doing any shutdown checks, poison writes.
if (gShutdownChecks != SCM_NOTHING) {