Bug 1496608 - Don't leak GeckoChildProcessHost when a content process fails to launch. r=mccr8

Depends on D8939

Differential Revision: https://phabricator.services.mozilla.com/D8940

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jed Davis 2018-11-22 00:06:09 +00:00
parent 47d57882cd
commit 3ef7ede064

View File

@ -2458,6 +2458,12 @@ ContentParent::~ContentParent()
!sBrowserContentParents->Contains(mRemoteType) ||
!sBrowserContentParents->Get(mRemoteType)->Contains(this));
}
// Normally mSubprocess is destroyed in ActorDestroy, but that won't
// happen if the process wasn't launched or if it failed to launch.
if (mSubprocess) {
DelayedDeleteSubprocess(mSubprocess);
}
}
void