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

Unified Diff: third_party/WebKit/Source/modules/fetch/FetchManager.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: Removed pipes around non-variables in a comment Created 4 years, 10 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/modules/fetch/FetchManager.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
index 6fe0bdeff7e53fce6cf27c6a9aa0c7d99f828a50..a638964119f86817df3e0da976e059a26859e4ad 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
@@ -611,9 +611,8 @@ void FetchManager::Loader::performHTTPFetch(bool corsFlag, bool corsPreflightFla
break;
}
InspectorInstrumentation::willStartFetch(executionContext(), this);
- m_loader = ThreadableLoader::create(*executionContext(), this, request, threadableLoaderOptions, resourceLoaderOptions);
- if (!m_loader)
- performNetworkError("Can't create ThreadableLoader");
+ m_loader = ThreadableLoader::create(*executionContext(), this, threadableLoaderOptions, resourceLoaderOptions);
+ m_loader->start(request);
}
// performDataFetch() is almost the same as performHTTPFetch(), except for:
@@ -646,9 +645,8 @@ void FetchManager::Loader::performDataFetch()
threadableLoaderOptions.crossOriginRequestPolicy = AllowCrossOriginRequests;
InspectorInstrumentation::willStartFetch(executionContext(), this);
- m_loader = ThreadableLoader::create(*executionContext(), this, request, threadableLoaderOptions, resourceLoaderOptions);
- if (!m_loader)
- performNetworkError("Can't create ThreadableLoader");
+ m_loader = ThreadableLoader::create(*executionContext(), this, threadableLoaderOptions, resourceLoaderOptions);
+ m_loader->start(request);
}
void FetchManager::Loader::failed(const String& message)

Powered by Google App Engine
This is Rietveld 408576698