Backed out 3 changesets (bug 1515497, bug 1545575) for build bustages at dom/media/ipc/RDDProcessHost.cpp on a CLOSED TREE
authorGurzau Raul <rgurzau@mozilla.com>
Sun, 28 Apr 2019 23:51:52 +0300
changeset 526388 9d5221dfb552ab7d00130cebbd66a3b674b1ae2e
parent 526387 e9bdef8981147f7838c32db18d98062aff05ee0f
child 526389 0107ae0af7e1cc35dafcbcfc0e512d5fe6e7b09e
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)
bugs1515497, 1545575
milestone67.0
backs out9d654bcc7cae40a6158827030d6ce179ca2392a9
fb16f716d2a8a5b9abf3130b03b6c99d4000d1c8
ff8a1d36e4416eedc96804bf9f5574972a42298b
Backed out 3 changesets (bug 1515497, bug 1545575) for build bustages at dom/media/ipc/RDDProcessHost.cpp on a CLOSED TREE Backed out changeset 9d654bcc7cae (bug 1545575) Backed out changeset fb16f716d2a8 (bug 1515497) Backed out changeset ff8a1d36e441 (bug 1515497)
dom/ipc/ContentParent.cpp
dom/media/ipc/RDDProcessHost.cpp
dom/media/platforms/agnostic/AgnosticDecoderModule.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -1063,18 +1063,19 @@ mozilla::ipc::IPCResult ContentParent::R
   if (XRE_IsParentProcess() &&
       BrowserTabsRemoteAutostart() &&  // only do rdd process if e10s on
       Preferences::GetBool("media.rdd-process.enabled", false)) {
     RDDProcessManager* rdd = RDDProcessManager::Get();
     if (rdd) {
       rdd->LaunchRDDProcess();
 
       bool rddOpened = rdd->CreateContentBridge(OtherPid(), aEndpoint);
-
-      if (NS_WARN_IF(!rddOpened)) {
+      MOZ_ASSERT(rddOpened);
+
+      if (!rddOpened) {
         *aRv = NS_ERROR_NOT_AVAILABLE;
       }
     } else {
       *aRv = NS_ERROR_NOT_AVAILABLE;
     }
   }
 
   return IPC_OK();
--- a/dom/media/ipc/RDDProcessHost.cpp
+++ b/dom/media/ipc/RDDProcessHost.cpp
@@ -123,33 +123,18 @@ void RDDProcessHost::InitAfterConnect(bo
 
   if (aSucceeded) {
     mProcessToken = ++sRDDProcessTokenCounter;
     mRDDChild = MakeUnique<RDDChild>(this);
     DebugOnly<bool> rv =
         mRDDChild->Open(GetChannel(), base::GetProcId(GetChildProcessHandle()));
     MOZ_ASSERT(rv);
 
-    bool startMacSandbox = false;
-
-#if defined(XP_MACOSX) && defined(MOZ_SANDBOX)
-    // If the sandbox was started at launch time,
-    // do not start the sandbox again.
-    startMacSandbox = !sLaunchWithMacSandbox;
-#endif
-
-    if (!mRDDChild->Init(startMacSandbox)) {
-      // 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 (!mRDDChild->Init()) {
+      KillHard("ActorInitFailed");
     }
   }
 
   if (mListener) {
     mListener->OnProcessLaunchComplete(this);
   }
 }
 
--- a/dom/media/platforms/agnostic/AgnosticDecoderModule.cpp
+++ b/dom/media/platforms/agnostic/AgnosticDecoderModule.cpp
@@ -25,21 +25,17 @@ bool AgnosticDecoderModule::SupportsMime
   bool supports =
       VPXDecoder::IsVPX(aMimeType) || OpusDataDecoder::IsOpus(aMimeType) ||
       WaveDataDecoder::IsWave(aMimeType) || TheoraDecoder::IsTheora(aMimeType);
   if (!StaticPrefs::MediaRddVorbisEnabled() ||
       !StaticPrefs::MediaRddProcessEnabled()) {
     supports |= VorbisDataDecoder::IsVorbis(aMimeType);
   }
 #ifdef MOZ_AV1
-  // We remove support for decoding AV1 here if RDD is enabled so that
-  // decoding on the content process doesn't accidentally happen in case
-  // something goes wrong with launching the RDD process.
-  if (StaticPrefs::MediaAv1Enabled() &&
-      !StaticPrefs::MediaRddProcessEnabled()) {
+  if (StaticPrefs::MediaAv1Enabled()) {
     supports |= AOMDecoder::IsAV1(aMimeType);
   }
 #endif
   MOZ_LOG(sPDMLog, LogLevel::Debug,
           ("Agnostic decoder %s requested type",
            supports ? "supports" : "rejects"));
   return supports;
 }
@@ -47,19 +43,17 @@ bool AgnosticDecoderModule::SupportsMime
 already_AddRefed<MediaDataDecoder> AgnosticDecoderModule::CreateVideoDecoder(
     const CreateDecoderParams& aParams) {
   RefPtr<MediaDataDecoder> m;
 
   if (VPXDecoder::IsVPX(aParams.mConfig.mMimeType)) {
     m = new VPXDecoder(aParams);
   }
 #ifdef MOZ_AV1
-  // see comment above about AV1 and the RDD process
   else if (AOMDecoder::IsAV1(aParams.mConfig.mMimeType) &&
-           !StaticPrefs::MediaRddProcessEnabled() &&
            StaticPrefs::MediaAv1Enabled()) {
     if (StaticPrefs::MediaAv1UseDav1d()) {
       m = new DAV1DDecoder(aParams);
     } else {
       m = new AOMDecoder(aParams);
     }
   }
 #endif