Bug 1550422 - P6. Release object early when error. r?mattwoodrow draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Tue, 14 May 2019 12:19:05 +1000
changeset 2008583 6fc8c9a7f77354381a26167a04a7f9d345e39f06
parent 2008582 f47d32abe14b41358f8d7b7879f6e0955fef8c0a
child 2008584 74aa9c272547782d14d3548a7c00021da5cf10d2
push id363925
push userjyavenard@mozilla.com
push dateSat, 18 May 2019 07:53:18 +0000
treeherdertry@5082cd581229 [default view] [failures only]
reviewersmattwoodrow
bugs1550422
milestone68.0a1
Bug 1550422 - P6. Release object early when error. r?mattwoodrow No need to keep the object alive. Differential Revision: https://phabricator.services.mozilla.com/D31014
dom/media/ipc/RDDProcessHost.cpp
gfx/ipc/GPUProcessHost.cpp
--- a/dom/media/ipc/RDDProcessHost.cpp
+++ b/dom/media/ipc/RDDProcessHost.cpp
@@ -62,16 +62,17 @@ bool RDDProcessHost::Launch(StringVector
   mSandboxLevel = Preferences::GetInt("security.sandbox.rdd.level");
 #endif
 
   mLaunchPhase = LaunchPhase::Waiting;
   mLaunchTime = TimeStamp::Now();
 
   if (!GeckoChildProcessHost::AsyncLaunch(aExtraOpts)) {
     mLaunchPhase = LaunchPhase::Complete;
+    mPrefSerializer = nullptr;
     return false;
   }
   return true;
 }
 
 bool RDDProcessHost::WaitForLaunch() {
   if (mLaunchPhase == LaunchPhase::Complete) {
     return !!mRDDChild;
--- a/gfx/ipc/GPUProcessHost.cpp
+++ b/gfx/ipc/GPUProcessHost.cpp
@@ -46,16 +46,17 @@ bool GPUProcessHost::Launch(StringVector
   mSandboxLevel = Preferences::GetInt("security.sandbox.gpu.level");
 #endif
 
   mLaunchPhase = LaunchPhase::Waiting;
   mLaunchTime = TimeStamp::Now();
 
   if (!GeckoChildProcessHost::AsyncLaunch(aExtraOpts)) {
     mLaunchPhase = LaunchPhase::Complete;
+    mPrefSerializer = nullptr;
     return false;
   }
   return true;
 }
 
 bool GPUProcessHost::WaitForLaunch() {
   if (mLaunchPhase == LaunchPhase::Complete) {
     return !!mGPUChild;