Bug 1376089 - IncrementalFinalizeRunnable must be a CancelableStream in order to be dispatch to workers, r=mccr8
authorAndrea Marchesini <amarchesini@mozilla.com>
Fri, 21 Jul 2017 17:30:55 +0200
changeset 419048 d6a2235600af44fc2108d6493f1ebc629ab07ff7
parent 419047 01ec9f33545a2f461a044500bddf746c81bf24f3
child 419049 90bc71d7d3c619d37ebac8f5e6f193e41a063b68
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1376089
milestone56.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 1376089 - IncrementalFinalizeRunnable must be a CancelableStream in order to be dispatch to workers, r=mccr8
xpcom/base/CycleCollectedJSRuntime.cpp
--- a/xpcom/base/CycleCollectedJSRuntime.cpp
+++ b/xpcom/base/CycleCollectedJSRuntime.cpp
@@ -103,17 +103,17 @@ using namespace mozilla::dom;
 namespace mozilla {
 
 struct DeferredFinalizeFunctionHolder
 {
   DeferredFinalizeFunction run;
   void* data;
 };
 
-class IncrementalFinalizeRunnable : public Runnable
+class IncrementalFinalizeRunnable : public CancelableRunnable
 {
   typedef AutoTArray<DeferredFinalizeFunctionHolder, 16> DeferredFinalizeArray;
   typedef CycleCollectedJSRuntime::DeferredFinalizerTable DeferredFinalizerTable;
 
   CycleCollectedJSRuntime* mRuntime;
   DeferredFinalizeArray mDeferredFinalizeFunctions;
   uint32_t mFinalizeFunctionToRun;
   bool mReleasing;
@@ -1283,17 +1283,17 @@ void
 CycleCollectedJSRuntime::DumpJSHeap(FILE* aFile)
 {
   JSContext* cx = CycleCollectedJSContext::Get()->Context();
   js::DumpHeap(cx, aFile, js::CollectNurseryBeforeDump);
 }
 
 IncrementalFinalizeRunnable::IncrementalFinalizeRunnable(CycleCollectedJSRuntime* aRt,
                                                          DeferredFinalizerTable& aFinalizers)
-  : Runnable("IncrementalFinalizeRunnable")
+  : CancelableRunnable("IncrementalFinalizeRunnable")
   , mRuntime(aRt)
   , mFinalizeFunctionToRun(0)
   , mReleasing(false)
 {
   for (auto iter = aFinalizers.Iter(); !iter.Done(); iter.Next()) {
     DeferredFinalizeFunction& function = iter.Key();
     void*& data = iter.Data();