Commit 32b1e19e authored by tyoshino@chromium.org's avatar tyoshino@chromium.org

[XHR] Call internalAbort() before firing events

If we fire internalAbort() after handleRequestError(), a new request
initiated by the event handler reusing the same XHR instance will be
aborted.

BUG=402855

Review URL: https://codereview.chromium.org/462053002

git-svn-id: svn://svn.chromium.org/blink/trunk@180326 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 639bc7aa
...@@ -982,9 +982,11 @@ void XMLHttpRequest::handleNetworkError() ...@@ -982,9 +982,11 @@ void XMLHttpRequest::handleNetworkError()
long long expectedLength = m_response.expectedContentLength(); long long expectedLength = m_response.expectedContentLength();
long long receivedLength = m_receivedLength; long long receivedLength = m_receivedLength;
if (!internalAbort())
return;
handleDidFailGeneric(); handleDidFailGeneric();
handleRequestError(NetworkError, EventTypeNames::error, receivedLength, expectedLength); handleRequestError(NetworkError, EventTypeNames::error, receivedLength, expectedLength);
internalAbort();
} }
void XMLHttpRequest::handleDidCancel() void XMLHttpRequest::handleDidCancel()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment