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

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

Issue 1264453002: Split the constructor of ThreadableLoader into two methods (ctor and start()) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added comments Created 4 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 dd7569f3e53c37b40a72e1da283df5298df1ab42..169c8b510c6bfc3f648d3c89bea918de12ce07cb 100644
--- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
+++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
@@ -921,12 +921,9 @@ void XMLHttpRequest::createRequest(PassRefPtr<EncodedFormData> httpBody, Excepti
if (m_upload)
request.setReportUploadProgress(true);
- // ThreadableLoader::create can return null here, for example if we're no longer attached to a page.
- // This is true while running onunload handlers.
- // FIXME: Maybe we need to be able to send XMLHttpRequests from onunload, <http://bugs.webkit.org/show_bug.cgi?id=10904>.
- // FIXME: Maybe create() can return null for other reasons too?
ASSERT(!m_loader);
- m_loader = ThreadableLoader::create(executionContext, this, request, options, resourceLoaderOptions);
+ m_loader = ThreadableLoader::create(executionContext, this, options, resourceLoaderOptions);
+ m_loader->start(request);
return;
}

Powered by Google App Engine
This is Rietveld 408576698