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

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

Issue 2624163002: [XHR] Add CHECK to make sure XHR::m_loader is not silently released (Closed)
Patch Set: fix 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
« 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 65b3bdc493eaac6fd03ced694969b80b8d246901..337e37c481e6243180400b27ad0c1cfe9931dec8 100644
--- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
+++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
@@ -1041,7 +1041,9 @@ void XMLHttpRequest::createRequest(PassRefPtr<EncodedFormData> httpBody,
if (m_upload)
request.setReportUploadProgress(true);
- DCHECK(!m_loader);
+ // TODO(yhirano): Turn this CHECK into DCHECK once https://crbug.com/667254
+ // is fixed.
+ CHECK(!m_loader);
DCHECK(m_sendFlag);
m_loader = ThreadableLoader::create(executionContext, this, options,
resourceLoaderOptions);
@@ -1050,6 +1052,8 @@ void XMLHttpRequest::createRequest(PassRefPtr<EncodedFormData> httpBody,
return;
}
+ // TODO(yhirano): Remove this CHECK once https://crbug.com/667254 is fixed.
+ CHECK(!m_loader);
// Use count for XHR synchronous requests.
UseCounter::count(&executionContext, UseCounter::XMLHttpRequestSynchronous);
ThreadableLoader::loadResourceSynchronously(executionContext, request, *this,
« 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