Backed out 2 changesets (bug 1278443) for being the next likely cause of frequent Wr failures a=backout
authorWes Kocher <wkocher@mozilla.com>
Mon, 24 Oct 2016 22:02:39 -0700
changeset 358495 90660f89ad092bd9cb32261637be6b1c33a9e731
parent 358494 fcd7ad8a2488527ce094cbdb3582c29437c155a8
child 358496 96b6a1a83bd74da807a67bb9449bc7158f6ee2cb
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1278443
milestone51.0a2
backs out0997fc0a73e859e7ed7c9d9765dcf96dbe9e4b95
b5cb894a7e3b4e6861391f2979bd397eb3a96288
Backed out 2 changesets (bug 1278443) for being the next likely cause of frequent Wr failures a=backout Backed out changeset 0997fc0a73e8 (bug 1278443) Backed out changeset b5cb894a7e3b (bug 1278443)
dom/media/systemservices/CamerasChild.cpp
dom/workers/RuntimeService.cpp
ipc/glue/BackgroundImpl.cpp
--- a/dom/media/systemservices/CamerasChild.cpp
+++ b/dom/media/systemservices/CamerasChild.cpp
@@ -82,20 +82,19 @@ public:
     ipc::PBackgroundChild* existingBackgroundChild =
       ipc::BackgroundChild::GetForCurrentThread();
     // If it's not spun up yet, block until it is, and retry
     if (!existingBackgroundChild) {
       LOG(("No existingBackgroundChild"));
       existingBackgroundChild =
         ipc::BackgroundChild::SynchronouslyCreateForCurrentThread();
       LOG(("BackgroundChild: %p", existingBackgroundChild));
-      if (!existingBackgroundChild) {
-        return NS_ERROR_FAILURE;
-      }
     }
+    // By now PBackground is guaranteed to be up
+    MOZ_RELEASE_ASSERT(existingBackgroundChild);
 
     // Create CamerasChild
     // We will be returning the resulting pointer (synchronously) to our caller.
     mCamerasChild =
       static_cast<mozilla::camera::CamerasChild*>(existingBackgroundChild->SendPCamerasConstructor());
 
     return NS_OK;
   }
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -2787,18 +2787,17 @@ 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.
-    // Failed in creating BackgroundChild: probably in shutdown. Continue to run
-    // without BackgroundChild created.
+    return NS_ERROR_UNEXPECTED;
   }
 
   class MOZ_STACK_CLASS SetThreadHelper final
   {
     // Raw pointer: this class is on the stack.
     WorkerPrivate* mWorkerPrivate;
 
   public:
--- a/ipc/glue/BackgroundImpl.cpp
+++ b/ipc/glue/BackgroundImpl.cpp
@@ -2028,23 +2028,16 @@ ChildImpl::OpenProtocolOnMainThread(nsIE
     }
 
     return true;
   }
 
   ContentChild* content = ContentChild::GetSingleton();
   MOZ_ASSERT(content);
 
-  if (content->IsShuttingDown()) {
-    // The transport for ContentChild is shut down and can't be used to open
-    // PBackground.
-    DispatchFailureCallback(aEventTarget);
-    return false;
-  }
-
   if (!PBackground::Open(content)) {
     MOZ_CRASH("Failed to create top level actor!");
     return false;
   }
 
   if (!sPendingTargets) {
     sPendingTargets = new nsTArray<nsCOMPtr<nsIEventTarget>>(1);
     ClearOnShutdown(&sPendingTargets);