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

Unified Diff: 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: Created 5 years, 5 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: Source/core/xmlhttprequest/XMLHttpRequest.cpp
diff --git a/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/Source/core/xmlhttprequest/XMLHttpRequest.cpp
index ddbde836da3c55855ac4d4c45b57722839c80089..b489e9ca33f6795b74d5f353af88078b2d41519c 100644
--- a/Source/core/xmlhttprequest/XMLHttpRequest.cpp
+++ b/Source/core/xmlhttprequest/XMLHttpRequest.cpp
@@ -933,12 +933,9 @@ void XMLHttpRequest::createRequest(PassRefPtr<FormData> httpBody, ExceptionState
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