Bug 1277582 - Don't send SendPHttpChannelConstructor ipdl messages during child shutdown r=dragana,jdm

MozReview-Commit-ID: F6pCCn4jPVb
This commit is contained in:
Valentin Gosu 2016-07-07 17:12:00 +03:00
parent 4aaedb4570
commit e49ed17270

View File

@ -1447,6 +1447,10 @@ HttpChannelChild::ConnectParent(uint32_t registrarId)
return NS_ERROR_ILLEGAL_VALUE;
}
if (tabChild && tabChild->IsDestroyed()) {
return NS_ERROR_FAILURE;
}
// The socket transport in the chrome process now holds a logical ref to us
// until OnStopRequest, or we do a redirect, or we hit an IPDL error.
AddIPDLReference();
@ -1965,15 +1969,21 @@ HttpChannelChild::ContinueAsyncOpen()
mChannelId.ToProvidedString(chid);
openArgs.channelId().AssignASCII(chid);
if (tabChild && tabChild->IsDestroyed()) {
return NS_ERROR_FAILURE;
}
// The socket transport in the chrome process now holds a logical ref to us
// until OnStopRequest, or we do a redirect, or we hit an IPDL error.
AddIPDLReference();
PBrowserOrId browser = static_cast<ContentChild*>(gNeckoChild->Manager())
->GetBrowserOrId(tabChild);
gNeckoChild->SendPHttpChannelConstructor(this, browser,
IPC::SerializedLoadContext(this),
openArgs);
if (!gNeckoChild->SendPHttpChannelConstructor(this, browser,
IPC::SerializedLoadContext(this),
openArgs)) {
return NS_ERROR_FAILURE;
}
if (optionalFDs.type() ==
OptionalFileDescriptorSet::TPFileDescriptorSetChild) {