Bug 1003766, StopSyncLoopRunnable::Cancel should call base class Cancel. r=mrbkap.
authorBen Turner <bent.mozilla@gmail.com>
Wed, 30 Apr 2014 13:44:03 -0700
changeset 181713 c56db0ba5b49056cc1a3638dc9befe749a32aa55
parent 181712 2df94d46bc5ab57278be1f06d371ec2122326d15
child 181714 1f00937ce4bde0d1df5853d6e8ab62c4b13b21b3
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersmrbkap
bugs1003766
milestone32.0a1
Bug 1003766, StopSyncLoopRunnable::Cancel should call base class Cancel. r=mrbkap.
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);