зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1422545 - Do not close connection between a httpChannelChild and its httpChannelParent if we need to divert to parent.r=mayhemer
If UnknowDecoder is involved and the received content is short we will know whether we need to divert to parent only after OnStartRequest of the listener chain is called. Therefore do not do cleanup if we detect diversion.
This commit is contained in:
Родитель
34afbed5d9
Коммит
00a47a6f30
|
@ -1100,6 +1100,19 @@ HttpChannelChild::OnStopRequest(const nsresult& channelStatus,
|
|||
// DoOnStopRequest() calls ReleaseListeners()
|
||||
}
|
||||
|
||||
// If unknownDecoder is involved and the received content is short we will
|
||||
// know whether we need to divert to parent only after OnStopRequest of the
|
||||
// listeners chain is called in DoOnStopRequest. At that moment
|
||||
// unknownDecoder will call OnStartRequest of the real listeners of the
|
||||
// channel including the OnStopRequest of UrlLoader which decides whether we
|
||||
// need to divert to parent.
|
||||
// If we are diverting to parent we should not do a cleanup.
|
||||
if (mDivertingToParent) {
|
||||
LOG(("HttpChannelChild::OnStopRequest - We are diverting to parent, "
|
||||
"postpone cleaning up."));
|
||||
return;
|
||||
}
|
||||
|
||||
CleanupBackgroundChannel();
|
||||
|
||||
// If there is a possibility we might want to write alt data to the cache
|
||||
|
|
Загрузка…
Ссылка в новой задаче