mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1066812 - Set AbortOnError in the ContentProcess on initialization. r=billm.
This will cause the content process to take itself down in the event that it loses communication with the parent process. This case is particularly important for the case where the parent process crashes while the content process is blocked or busy on the main thread, as the content process will no longer continue to exist as a zombie process, but will shut down after a short delay.
This commit is contained in:
parent
ce02722142
commit
eb4205771e
@ -615,6 +615,10 @@ ContentChild::Init(MessageLoop* aIOLoop,
|
||||
// urgent messages.
|
||||
GetIPCChannel()->BlockScripts();
|
||||
|
||||
// If communications with the parent have broken down, take the process
|
||||
// down so it's not hanging around.
|
||||
GetIPCChannel()->SetAbortOnError(true);
|
||||
|
||||
#ifdef MOZ_X11
|
||||
// Send the parent our X socket to act as a proxy reference for our X
|
||||
// resources.
|
||||
@ -2571,6 +2575,8 @@ ContentChild::RecvShutdown()
|
||||
os->NotifyObservers(this, "content-child-shutdown", nullptr);
|
||||
}
|
||||
|
||||
GetIPCChannel()->SetAbortOnError(false);
|
||||
|
||||
// Ignore errors here. If this fails, the parent will kill us after a
|
||||
// timeout.
|
||||
unused << SendFinishShutdown();
|
||||
|
@ -88,7 +88,7 @@ class MessageChannel : HasResultCodes
|
||||
|
||||
void SetAbortOnError(bool abort)
|
||||
{
|
||||
mAbortOnError = true;
|
||||
mAbortOnError = abort;
|
||||
}
|
||||
|
||||
// Misc. behavioral traits consumers can request for this channel
|
||||
|
Loading…
Reference in New Issue
Block a user