Bug 1376089 - IncrementalFinalizeRunnable must be a CancelableStream in order to be dispatch to workers. r=mccr8, a=jcristau FENNEC_55_0b12_BUILD1 FENNEC_55_0b12_RELEASE FIREFOX_55_0b12_BUILD1 FIREFOX_55_0b12_RELEASE
authorAndrea Marchesini <amarchesini@mozilla.com>
Fri, 21 Jul 2017 17:30:55 +0200
changeset 412073 5ff8131b551228ca603a76e39925495d7d2a407e
parent 412072 ed08245d52332cadf13498c0a88bcd1a0bd68d1d
child 412074 009589ce9026e61b96633c6d7fe346159be3b21e
push id7541
push userryanvm@gmail.com
push dateMon, 24 Jul 2017 12:53:08 +0000
treeherdermozilla-beta@5ff8131b5512 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8, jcristau
bugs1376089
milestone55.0
Bug 1376089 - IncrementalFinalizeRunnable must be a CancelableStream in order to be dispatch to workers. r=mccr8, a=jcristau
xpcom/base/CycleCollectedJSRuntime.cpp
--- a/xpcom/base/CycleCollectedJSRuntime.cpp
+++ b/xpcom/base/CycleCollectedJSRuntime.cpp
@@ -101,17 +101,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;
@@ -1263,17 +1263,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();