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

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

Issue 2649513002: Add a pre-finalizer for XHR to cancel the loader (Closed)
Patch Set: Created 3 years, 11 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
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 9793325ff96d0bc872026c77500a663326e8ad10..e766eef1cb347c81f669ebf9600bc0d3ab754297 100644
--- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
+++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
@@ -1104,6 +1104,13 @@ void XMLHttpRequest::abort() {
m_state = kUnsent;
}
+void XMLHttpRequest::dispose() {
+ if (m_loader) {
+ m_error = true;
+ m_loader->cancel();
+ }
+}
+
void XMLHttpRequest::clearVariablesForLoading() {
if (m_blobLoader) {
m_blobLoader->cancel();

Powered by Google App Engine
This is Rietveld 408576698