From 8a8ff888d2e3ed4a67eb32597446586930962f9e Mon Sep 17 00:00:00 2001 From: Eric Rahm Date: Wed, 10 Jun 2015 21:31:33 -0700 Subject: [PATCH] Bug 1171722 - Part 3: Specify gcreason::XPCONNECT_SHUTDOWN during xpconnect shutdown. r=mccr8 --- js/xpconnect/src/nsXPConnect.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/xpconnect/src/nsXPConnect.cpp b/js/xpconnect/src/nsXPConnect.cpp index 4cdb40fe20d..428c0b187df 100644 --- a/js/xpconnect/src/nsXPConnect.cpp +++ b/js/xpconnect/src/nsXPConnect.cpp @@ -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;