mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1819410 - Ensure we shutdown the RemoteSandboxBrokerParent IPDL instance during launch failures. r=jld
If the process being launched by the sandbox broker crashes after we setup the IPDL channel, but before we successfully complete the initialization process, we don't explicitly teardown RemoteSandboxBrokerParent. As such, when we destroy the owning objects, it attempts to destroy RemoteSandboxBrokerParent while the protocol is still open, triggering a release assert for destroying PRemoteSandboxBrokerParent while the protocol/channel are still open. This patch makes us explicitly teardown the channel if there is a launch failure inside the sandbox broker. Differential Revision: https://phabricator.services.mozilla.com/D171258
This commit is contained in:
parent
db773748bb
commit
54093fb0ef
@ -103,6 +103,7 @@ bool RemoteSandboxBroker::LaunchApp(
|
|||||||
bool rv = mParent.SendLaunchApp(std::move(mParameters), &ok, &handle) && ok;
|
bool rv = mParent.SendLaunchApp(std::move(mParameters), &ok, &handle) && ok;
|
||||||
mParameters.shareHandles().Clear();
|
mParameters.shareHandles().Clear();
|
||||||
if (!rv) {
|
if (!rv) {
|
||||||
|
mParent.Shutdown();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,6 +112,7 @@ bool RemoteSandboxBroker::LaunchApp(
|
|||||||
HANDLE ourChildHandle = 0;
|
HANDLE ourChildHandle = 0;
|
||||||
bool dh = mParent.DuplicateFromLauncher((HANDLE)handle, &ourChildHandle);
|
bool dh = mParent.DuplicateFromLauncher((HANDLE)handle, &ourChildHandle);
|
||||||
if (!dh) {
|
if (!dh) {
|
||||||
|
mParent.Shutdown();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user