Bug 1278443 - Part 2: Continue to run the worker even if BackgroundChild fails to create. r=mrbkap
authorCervantes Yu <cyu@mozilla.com>
Wed, 05 Oct 2016 16:57:31 +0800
changeset 345370 d4858e65d890eefccfcfbc157f456614c275f139
parent 345369 53a144cdc9737b74baee6f36c0e1e125c72ee6e6
child 345371 7eb011a5b42119ee118d7d12080031c10f0f2213
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs1278443
milestone52.0a1
Bug 1278443 - Part 2: Continue to run the worker even if BackgroundChild fails to create. r=mrbkap MozReview-Commit-ID: LBBN4hfXigf
dom/workers/RuntimeService.cpp
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -2803,17 +2803,18 @@ WorkerThreadPrimaryRunnable::Run()
 
   profiler_register_thread(threadName.get(), &stackBaseGuess);
 
   // Note: SynchronouslyCreateForCurrentThread() must be called prior to
   //       mWorkerPrivate->SetThread() in order to avoid accidentally consuming
   //       worker messages here.
   if (NS_WARN_IF(!BackgroundChild::SynchronouslyCreateForCurrentThread())) {
     // XXX need to fire an error at parent.
-    return NS_ERROR_UNEXPECTED;
+    // Failed in creating BackgroundChild: probably in shutdown. Continue to run
+    // without BackgroundChild created.
   }
 
   class MOZ_STACK_CLASS SetThreadHelper final
   {
     // Raw pointer: this class is on the stack.
     WorkerPrivate* mWorkerPrivate;
 
   public: