зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1607984 - P10. Wait until OnStopRequest has been called to clear mRequest. 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:
Родитель
80eaecc238
Коммит
11eba58643
|
@ -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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче