Bug 1607984 - P10. Wait until OnStopRequest has been called to clear mRequest. ?valentin r=valentin

The code assumed that nsJARChannel::RetargetDeliveryTo would have been called synchronously from nsJARChannel::OnStartRequest, which would be true if we weren't using a DocumentChannel.

The DocumentLoadListener queue the calls to OnStartRequest until the final redirect.
nsJARChannel::RetargetDelivery mRequest member is be set to forward the call.
So we need to only reset it once OnStopRequest has been received.

Differential Revision: https://phabricator.services.mozilla.com/D70007
This commit is contained in:
Jean-Yves Avenard 2020-04-23 00:57:40 +00:00
Родитель b9eb27d09b
Коммит f5e748a2d9
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -997,7 +997,6 @@ nsJARChannel::OnStartRequest(nsIRequest* req) {
mRequest = req;
nsresult rv = mListener->OnStartRequest(this);
mRequest = nullptr;
if (NS_FAILED(rv)) {
return rv;
}
@ -1038,6 +1037,7 @@ nsJARChannel::OnStopRequest(nsIRequest* req, nsresult status) {
if (mLoadGroup) mLoadGroup->RemoveRequest(this, nullptr, status);
mRequest = nullptr;
mPump = nullptr;
mIsPending = false;