diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp index 735a26ce2718..0db8c7dcd861 100644 --- a/dom/base/nsJSEnvironment.cpp +++ b/dom/base/nsJSEnvironment.cpp @@ -1785,10 +1785,8 @@ nsJSContext::BeginCycleCollectionCallback() 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,