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

Unified Diff: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp

Issue 2271033003: Suppress cancellation notification in XMLHttpRequest::endLoading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 4 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
index 41c0edcdf32afe2abb78461b697dbab069a8d114..4e1085e5ea2f5555338f704e0ce50a5733ee2c32 100644
--- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
+++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
@@ -1472,7 +1472,12 @@ void XMLHttpRequest::endLoading()
InspectorInstrumentation::didFinishXHRLoading(getExecutionContext(), this, this, m_method, m_url);
if (m_loader) {
+ const bool hasError = m_error;
+ // Set |m_error| in order to suppress the cancel notification (see
+ // XMLHttpRequest::didFail).
+ m_error = true;
m_loader->cancel();
+ m_error = hasError;
m_loader = nullptr;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698