Backed out changeset c6819fdea3a5 (bug 1695216) for causing XMLHttpRequestWorker related crashes. CLOSED TREE

This commit is contained in:
Cosmin Sabou
2021-09-23 20:25:21 +03:00
parent 5af39112a1
commit 4dbb70d01b
4 changed files with 13 additions and 19 deletions

View File

@@ -2239,17 +2239,6 @@ XMLHttpRequestMainThread::OnStopRequest(nsIRequest* request, nsresult status) {
mErrorLoad = ErrorType::eUnreachable;
mResponseXML = nullptr;
// Handle network errors specifically per spec.
if (NS_ERROR_GET_MODULE(status) == NS_ERROR_MODULE_NETWORK) {
IgnoredErrorResult rv;
RequestErrorSteps(ProgressEventType::error, NS_ERROR_DOM_NETWORK_ERR, rv);
// RequestErrorSteps sets state to DONE, but because we are throwing an
// error, a progress event is never fired. Calling ChangeStateToDone
// ensures that.
ChangeStateToDone(wasSync);
return NS_OK;
}
}
// If we're uninitialized at this point, we encountered an error