Bug 1452245 - The parent side isn't closed if the child dies unexpectedly, r=valentin

This commit is contained in:
Fabrice Desré 2018-05-23 15:22:00 +03:00
parent 574a724d01
commit 1d3ef19262

View File

@ -283,6 +283,14 @@ void
WebSocketChannelParent::ActorDestroy(ActorDestroyReason why)
{
LOG(("WebSocketChannelParent::ActorDestroy() %p\n", this));
// Make sure we close the channel if the content process dies without going
// through a clean shutdown.
if (mChannel) {
Unused << mChannel->Close(nsIWebSocketChannel::CLOSE_GOING_AWAY,
NS_LITERAL_CSTRING("Child was killed"));
}
mIPCOpen = false;
}