Bug 1373046 - Use idle dispatch for IncrementalFinalizeRunnable. r=billm
authorBevis Tseng <btseng@mozilla.com>
Tue, 15 Aug 2017 17:30:24 +0800
changeset 375901 6668a2b3f65ac1b362fc1c2c4511ad8d8ee13d2f
parent 375859 7dddbd85047c6dc73ddbe1e423cd643a217845b3
child 375902 cc147ac0de393630cebd527e16f8c33497810871
push id49232
push userarchaeopteryx@coole-files.de
push dateMon, 21 Aug 2017 11:43:09 +0000
treeherderautoland@db3ebc1d503c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1373046
milestone57.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 1373046 - Use idle dispatch for IncrementalFinalizeRunnable. r=billm MozReview-Commit-ID: 2xVjTSHTcFb
xpcom/base/CycleCollectedJSRuntime.cpp
--- a/xpcom/base/CycleCollectedJSRuntime.cpp
+++ b/xpcom/base/CycleCollectedJSRuntime.cpp
@@ -1421,17 +1421,17 @@ CycleCollectedJSRuntime::FinalizeDeferre
 
   mFinalizeRunnable = new IncrementalFinalizeRunnable(this,
                                                       mDeferredFinalizerTable);
 
   // Everything should be gone now.
   MOZ_ASSERT(mDeferredFinalizerTable.Count() == 0);
 
   if (aType == CycleCollectedJSContext::FinalizeIncrementally) {
-    NS_DispatchToCurrentThread(mFinalizeRunnable);
+    NS_IdleDispatchToCurrentThread(do_AddRef(mFinalizeRunnable), 2500);
   } else {
     mFinalizeRunnable->ReleaseNow(false);
     MOZ_ASSERT(!mFinalizeRunnable);
   }
 }
 
 void
 CycleCollectedJSRuntime::AnnotateAndSetOutOfMemory(OOMState* aStatePtr,