Bug 1003766, StopSyncLoopRunnable::Cancel should call base class Cancel. r=mrbkap, a=lsblakk.
authorBen Turner <bent.mozilla@gmail.com>
Wed, 30 Apr 2014 13:44:03 -0700
changeset 192334 7d980d9af355
parent 192333 8b801635d8ce
child 192339 1c26f6798184
push id3572
push userbturner@mozilla.com
push date2014-05-20 18:16 +0000
treeherdermozilla-beta@7d980d9af355 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap, lsblakk
bugs1003766
milestone30.0
Bug 1003766, StopSyncLoopRunnable::Cancel should call base class Cancel. r=mrbkap, a=lsblakk.
dom/workers/WorkerRunnable.cpp
--- a/dom/workers/WorkerRunnable.cpp
+++ b/dom/workers/WorkerRunnable.cpp
@@ -394,19 +394,22 @@ StopSyncLoopRunnable::StopSyncLoopRunnab
   mWorkerPrivate->AssertValidSyncLoop(mSyncLoopTarget);
 #endif
 }
 
 NS_IMETHODIMP
 StopSyncLoopRunnable::Cancel()
 {
   nsresult rv = Run();
-  NS_ENSURE_SUCCESS(rv, rv);
+  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Run() failed");
 
-  return NS_OK;
+  nsresult rv2 = WorkerSyncRunnable::Cancel();
+  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv2), "Cancel() failed");
+
+  return NS_FAILED(rv) ? rv : rv2;
 }
 
 bool
 StopSyncLoopRunnable::WorkerRun(JSContext* aCx,
                                 WorkerPrivate* aWorkerPrivate)
 {
   aWorkerPrivate->AssertIsOnWorkerThread();
   MOZ_ASSERT(mSyncLoopTarget);