Bug 1641496 - P3: Avoid ODA message being processed when the channel is already failed r=dragana

Differential Revision: https://phabricator.services.mozilla.com/D77274
This commit is contained in:
Kershaw Chang 2020-06-04 22:56:45 +00:00
parent 99face40e3
commit ef6ab5d3fb

View File

@ -160,6 +160,15 @@ IPCResult HttpBackgroundChannelChild::RecvOnTransportAndData(
return IPC_OK();
}
// The HttpTransactionChild in socket process may not know that this request
// is cancelled or failed due to the IPC delay. In this case, we should not
// forward ODA to HttpChannelChild.
nsresult channelStatus;
mChannelChild->GetStatus(&channelStatus);
if (NS_FAILED(channelStatus)) {
return IPC_OK();
}
if (IsWaitingOnStartRequest(aDataFromSocketProcess)) {
LOG((" > pending until OnStartRequest [offset=%" PRIu64 " count=%" PRIu32
"]\n",