Bug 703380 - XMLHttpRequest can fire an abort event after a load event, but should not; r=smaug

--HG--
extra : rebase_source : 07e72b23cfad23e0ea1e860fa48b1f6ed0587412
This commit is contained in:
Masatoshi Kimura 2011-11-21 12:07:12 -06:00
parent d59a4c548f
commit 7f072394e6

View File

@ -1214,16 +1214,16 @@ nsXMLHttpRequest::Abort()
XML_HTTP_REQUEST_OPENED |
XML_HTTP_REQUEST_DONE))) {
ChangeState(XML_HTTP_REQUEST_DONE, true);
}
if (!(mState & XML_HTTP_REQUEST_SYNCLOOPING)) {
NS_NAMED_LITERAL_STRING(abortStr, ABORT_STR);
DispatchProgressEvent(this, abortStr, mLoadLengthComputable, responseLength,
mLoadTotal);
if (mUpload && !mUploadComplete) {
mUploadComplete = true;
DispatchProgressEvent(mUpload, abortStr, true, mUploadTransferred,
mUploadTotal);
if (!(mState & XML_HTTP_REQUEST_SYNCLOOPING)) {
NS_NAMED_LITERAL_STRING(abortStr, ABORT_STR);
DispatchProgressEvent(this, abortStr, mLoadLengthComputable, responseLength,
mLoadTotal);
if (mUpload && !mUploadComplete) {
mUploadComplete = true;
DispatchProgressEvent(mUpload, abortStr, true, mUploadTransferred,
mUploadTotal);
}
}
}