Bug 1288033 - Decease the busyCount when Cancel() is called in WorkerRunnable, r=khuey
☠☠ backed out by 008ef774d48e ☠ ☠
authorAndrea Marchesini <amarchesini@mozilla.com>
Thu, 21 Jul 2016 09:17:41 +0200
changeset 331101 512f176d3de68d731744abe4c265dee397e2cef0
parent 331100 04cf459f7fc6e0315fe8c0978b83f5ac8e0ec37d
child 331102 ba6b75f296522d9e351d1201ed8c981824c61da8
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs1288033
milestone50.0a1
Bug 1288033 - Decease the busyCount when Cancel() is called in WorkerRunnable, r=khuey
dom/workers/WorkerRunnable.cpp
--- a/dom/workers/WorkerRunnable.cpp
+++ b/dom/workers/WorkerRunnable.cpp
@@ -255,16 +255,20 @@ WorkerRunnable::Run()
 
     Cancel();
 
     MOZ_ASSERT(mCallingCancelWithinRun);
     mCallingCancelWithinRun = false;
 
     MOZ_ASSERT(IsCanceled(), "Subclass Cancel() didn't set IsCanceled()!");
 
+    if (mBehavior == WorkerThreadModifyBusyCount) {
+      mWorkerPrivate->ModifyBusyCountFromWorker(WorkerPrivate::eDecreaseBusyCount);
+    }
+
     return NS_OK;
   }
 
   bool result = PreRun(mWorkerPrivate);
   if (!result) {
     MOZ_ASSERT(targetIsWorkerThread,
                "The only PreRun implementation that can fail is "
                "ScriptExecutorRunnable");