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

Unified Diff: third_party/WebKit/Source/core/loader/ThreadableLoader.cpp

Issue 2701753003: [WIP] off-main-thread loading
Patch Set: small fix Created 3 years, 8 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/loader/ThreadableLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/ThreadableLoader.cpp b/third_party/WebKit/Source/core/loader/ThreadableLoader.cpp
index 63cefa8db4d2e91d0e78283b3dec8718f7360008..8a723fa73a0f706bb790ca6dee169884b45333a4 100644
--- a/third_party/WebKit/Source/core/loader/ThreadableLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/ThreadableLoader.cpp
@@ -34,8 +34,15 @@
#include "core/dom/ExecutionContext.h"
#include "core/loader/DocumentThreadableLoader.h"
#include "core/loader/ThreadableLoadingContext.h"
+#include "core/loader/WorkerFetchContext.h"
#include "core/loader/WorkerThreadableLoader.h"
#include "core/workers/WorkerGlobalScope.h"
+#include "platform/exported/WrappedResourceRequest.h"
+#include "platform/loader/fetch/FetchRequest.h"
+#include "platform/loader/fetch/RawResource.h"
+#include "public/platform/Platform.h"
+#include "public/platform/WebURLLoader.h"
+#include "public/platform/WebURLLoaderClient.h"
namespace blink {
@@ -47,6 +54,12 @@ ThreadableLoader* ThreadableLoader::create(
DCHECK(client);
if (context.isWorkerGlobalScope()) {
+ WorkerFetchContext* workerFetchContrext = WorkerFetchContext::from(context);
+ if (workerFetchContrext) {
+ return DocumentThreadableLoader::create(
+ *ThreadableLoadingContext::create(*toWorkerGlobalScope(&context)),
+ client, options, resourceLoaderOptions);
+ }
return WorkerThreadableLoader::create(toWorkerGlobalScope(context), client,
options, resourceLoaderOptions);
}
« no previous file with comments | « third_party/WebKit/Source/core/loader/PingLoader.cpp ('k') | third_party/WebKit/Source/core/loader/ThreadableLoadingContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698