Bug 1362354 - Handle XHRs with aborted bindings as aborted rather than network errors. r=baku

MozReview-Commit-ID: 86e00dRe6qc
This commit is contained in:
Thomas Wisniewski
2018-08-02 19:07:07 -07:00
parent 46b7ce906e
commit 0b3e443ddf
2 changed files with 8 additions and 4 deletions

View File

@@ -2100,6 +2100,14 @@ XMLHttpRequestMainThread::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
mXMLParserStreamListener = nullptr;
mContext = nullptr;
// If window.stop() or other aborts were issued, handle as an abort
if (status == NS_BINDING_ABORTED) {
mFlagParseBody = false;
IgnoredErrorResult rv;
RequestErrorSteps(ProgressEventType::abort, NS_OK, rv);
return NS_OK;
}
bool waitingForBlobCreation = false;
// If we have this error, we have to deal with a file: URL + responseType =