Bug 1018397 - Start an ICC timer even if ICC is globally disabled. r=smaug
authorAndrew McCreight <continuation@gmail.com>
Thu, 13 Nov 2014 07:11:55 -0800
changeset 215518 005e5bb697d31a05ad76b3b1998c4fe5b5a52128
parent 215517 031fbc2b4e1cf033c6648ab3ed7d418b16c05aa9
child 215519 4e7a0c00c991eecc7ab315f2333362338ad6efbe
push id27818
push userryanvm@gmail.com
push dateThu, 13 Nov 2014 20:19:09 +0000
treeherdermozilla-central@292ed84594c1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1018397
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1018397 - Start an ICC timer even if ICC is globally disabled. r=smaug
dom/base/nsJSEnvironment.cpp
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -1780,20 +1780,18 @@ nsJSContext::BeginCycleCollectionCallbac
   gCCStats.mSuspected = nsCycleCollector_suspectedCount();
 
   KillCCTimer();
 
   gCCStats.RunForgetSkippable();
 
   MOZ_ASSERT(!sICCTimer, "Tried to create a new ICC timer when one already existed.");
 
-  if (!sIncrementalCC) {
-    return;
-  }
-
+  // Create an ICC timer even if ICC is globally disabled, because we could be manually triggering
+  // an incremental collection, and we want to be sure to finish it.
   CallCreateInstance("@mozilla.org/timer;1", &sICCTimer);
   if (sICCTimer) {
     sICCTimer->InitWithFuncCallback(ICCTimerFired,
                                     nullptr,
                                     kICCIntersliceDelay,
                                     nsITimer::TYPE_REPEATING_SLACK);
   }
 }