зеркало из https://github.com/mozilla/gecko-dev.git
Make it safe to close an IPC channel that has already been closed by its remote endpoint. (bug 1314816 part 2, r=billm)
This commit is contained in:
Родитель
a2d3e4e9f2
Коммит
fa968bf690
|
@ -2265,14 +2265,18 @@ MessageChannel::Close()
|
|||
return;
|
||||
}
|
||||
|
||||
if (ChannelConnected != mChannelState) {
|
||||
if (ChannelClosed == mChannelState) {
|
||||
// XXX be strict about this until there's a compelling reason
|
||||
// to relax
|
||||
NS_RUNTIMEABORT("Close() called on closed channel!");
|
||||
}
|
||||
|
||||
// notify the other side that we're about to close our socket
|
||||
// Notify the other side that we're about to close our socket. If we've
|
||||
// already received a Goodbye from the other side (and our state is
|
||||
// ChannelClosing), there's no reason to send one.
|
||||
if (ChannelConnected == mChannelState) {
|
||||
mLink->SendMessage(new GoodbyeMessage());
|
||||
}
|
||||
SynchronouslyClose();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче