Bug 1171722 - Part 3: Specify gcreason::XPCONNECT_SHUTDOWN during xpconnect shutdown. r=mccr8

This commit is contained in:
Eric Rahm 2015-06-10 21:31:33 -07:00
parent f52699c13a
commit 8a8ff888d2

View File

@ -85,7 +85,7 @@ nsXPConnect::~nsXPConnect()
// XPConnect, to clean the stuff we forcibly disconnected. The forced
// shutdown code defaults to leaking in a number of situations, so we can't
// get by with only the second GC. :-(
JS_GC(mRuntime->Runtime());
mRuntime->GarbageCollect(JS::gcreason::XPCONNECT_SHUTDOWN);
mShuttingDown = true;
XPCWrappedNativeScope::SystemIsBeingShutDown();
@ -95,7 +95,7 @@ nsXPConnect::~nsXPConnect()
// after which point we need to GC to clean everything up. We need to do
// this before deleting the XPCJSRuntime, because doing so destroys the
// maps that our finalize callback depends on.
JS_GC(mRuntime->Runtime());
mRuntime->GarbageCollect(JS::gcreason::XPCONNECT_SHUTDOWN);
NS_RELEASE(gSystemPrincipal);
gScriptSecurityManager = nullptr;