Bug 1545575 - stop RDD process cleanly if linux sandbox fails to init. r=bryce a=pascalc
authorMichael Froman <mfroman@mozilla.com>
Wed, 24 Apr 2019 16:55:03 +0000
changeset 526395 9d58201430493a7c6328ee32dcea55b3ca98a154
parent 526394 82662d1130d18f74646dcc3fcc3fba902e443ddc
child 526396 a43242faedaacc34f505852a701d2e46dd347987
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbryce, pascalc
bugs1545575
milestone67.0
Bug 1545575 - stop RDD process cleanly if linux sandbox fails to init. r=bryce a=pascalc Differential Revision: https://phabricator.services.mozilla.com/D28663
dom/media/ipc/RDDProcessHost.cpp
--- a/dom/media/ipc/RDDProcessHost.cpp
+++ b/dom/media/ipc/RDDProcessHost.cpp
@@ -124,17 +124,24 @@ void RDDProcessHost::InitAfterConnect(bo
   if (aSucceeded) {
     mProcessToken = ++sRDDProcessTokenCounter;
     mRDDChild = MakeUnique<RDDChild>(this);
     DebugOnly<bool> rv =
         mRDDChild->Open(GetChannel(), base::GetProcId(GetChildProcessHandle()));
     MOZ_ASSERT(rv);
 
     if (!mRDDChild->Init()) {
-      KillHard("ActorInitFailed");
+      // Can't just kill here because it will create a timing race that
+      // will crash the tab. We don't really want to crash the tab just
+      // because RDD linux sandbox failed to initialize.  In this case,
+      // we'll close the child channel which will cause the RDD process
+      // to shutdown nicely avoiding the tab crash (which manifests as
+      // Bug 1535335).
+      mRDDChild->Close();
+      return;
     }
   }
 
   if (mListener) {
     mListener->OnProcessLaunchComplete(this);
   }
 }