Bug 1377471 - only send DocumentChannelCleanup message if HTTPChannelChild is still opened. r?mayhemer
PHttpChannel might already be closed while processing OnStopRequestEvent. Need to check mIPCOpen flag
before sending DocumentChannelCleanup message.
MozReview-Commit-ID: 74Iyl4w5FPc
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -1081,18 +1081,21 @@ HttpChannelChild::OnStopRequest(const ns
// we might need later to open the Alt-Data output stream, so just return here
if (!mPreferredCachedAltDataType.IsEmpty()) {
mKeptAlive = true;
return;
}
if (mLoadFlags & LOAD_DOCUMENT_URI) {
// Keep IPDL channel open, but only for updating security info.
- mKeptAlive = true;
- SendDocumentChannelCleanup();
+ // If IPDL is already closed, then do nothing.
+ if (mIPCOpen) {
+ mKeptAlive = true;
+ SendDocumentChannelCleanup();
+ }
} else {
// The parent process will respond by sending a DeleteSelf message and
// making sure not to send any more messages after that.
TrySendDeletingChannel();
}
}
void