Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1496)

Unified Diff: Source/core/xml/XMLHttpRequest.cpp

Issue 76133002: XHR: reset error flag on aborting request that restarts. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/reentrant-cancel-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XMLHttpRequest.cpp
diff --git a/Source/core/xml/XMLHttpRequest.cpp b/Source/core/xml/XMLHttpRequest.cpp
index ab18af4786f9845c70b2730c6e745a7819f5c7ef..1adb1717bea29df055e83a4e52c17d95bdeeae66 100644
--- a/Source/core/xml/XMLHttpRequest.cpp
+++ b/Source/core/xml/XMLHttpRequest.cpp
@@ -914,6 +914,12 @@ bool XMLHttpRequest::internalAbort(DropProtection async)
// Save to a local variable since we're going to drop protection.
bool newLoadStarted = m_loader;
+ // If abort() called internalAbort() and a nested open() ended up
+ // clearing the error flag, but didn't send(), make sure the error
+ // flag is still set.
+ if (!newLoadStarted)
+ m_error = true;
+
if (async == DropProtectionAsync)
dropProtectionSoon();
else
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/reentrant-cancel-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698