Bug 1594147 - prevent possible null dereference in MaybeDispatchPrematureAbortEvents, r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D52409

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Junior Hsu 2019-11-08 22:28:07 +00:00
parent e34d04af1f
commit d49c1bb5ec

View File

@ -1529,6 +1529,12 @@ void XMLHttpRequestWorker::MaybeDispatchPrematureAbortEvents(ErrorResult& aRv) {
return;
}
// Similarly to null check in ::Open, mProxy may have been cleared here.
if (!mProxy) {
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
return;
}
mProxy->mSeenUploadLoadStart = false;
}