Bug 806433 - Make mReleaseRunnable a ref ptr. r=smaug a=lsblakk
authorAndrew McCreight <amccreight@mozilla.com>
Tue, 30 Oct 2012 20:01:31 -0700
changeset 109763 3baf42fac879b9126525f98da21e83b2501d3ce4
parent 109760 ef3f9b1edeb91151f3fdb45089528fed31abffd9
child 109764 47a455864ed7fde28afa6d302fcadfe209864690
push id1658
push useramccreight@mozilla.com
push dateThu, 01 Nov 2012 18:36:22 +0000
treeherdermozilla-beta@3baf42fac879 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, lsblakk
bugs806433
milestone17.0
Bug 806433 - Make mReleaseRunnable a ref ptr. r=smaug a=lsblakk
js/xpconnect/src/XPCJSRuntime.cpp
js/xpconnect/src/xpcprivate.h
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -2132,17 +2132,16 @@ XPCJSRuntime::XPCJSRuntime(nsXPConnect* 
    mVariantRoots(nullptr),
    mWrappedJSRoots(nullptr),
    mObjectHolderRoots(nullptr),
    mWatchdogLock(nullptr),
    mWatchdogWakeup(nullptr),
    mWatchdogThread(nullptr),
    mWatchdogHibernating(false),
    mLastActiveTime(-1),
-   mReleaseRunnable(nullptr),
    mExceptionManagerNotAvailable(false)
 {
 #ifdef XPC_CHECK_WRAPPERS_AT_SHUTDOWN
     DEBUG_WrappedNativeHashtable =
         JS_NewDHashTable(JS_DHashGetStubOps(), nullptr,
                          sizeof(JSDHashEntryStub), 128);
 #endif
     NS_TIME_FUNCTION;
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -909,17 +909,17 @@ private:
     XPCRootSetElem *mObjectHolderRoots;
     JSDHashTable mJSHolders;
     PRLock *mWatchdogLock;
     PRCondVar *mWatchdogWakeup;
     PRThread *mWatchdogThread;
     nsTArray<JSGCCallback> extraGCCallbacks;
     bool mWatchdogHibernating;
     PRTime mLastActiveTime; // -1 if active NOW
-    XPCIncrementalReleaseRunnable *mReleaseRunnable;
+    nsRefPtr<XPCIncrementalReleaseRunnable> mReleaseRunnable;
     js::GCSliceCallback mPrevGCSliceCallback;
 
     nsCOMPtr<nsIException>   mPendingException;
     nsCOMPtr<nsIExceptionManager> mExceptionManager;
     bool mExceptionManagerNotAvailable;
 
     friend class AutoLockWatchdog;
     friend class XPCIncrementalReleaseRunnable;