Index: third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp |
diff --git a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp |
index 9f0e0963d6edaa02f0cde45b4c88bd069791d8ba..798288a467d87b772f869643deb7088c8c91e380 100644 |
--- a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp |
@@ -37,6 +37,7 @@ |
#include "core/loader/FrameLoadRequest.h" |
#include "core/loader/FrameLoader.h" |
#include "core/loader/ThreadableLoadingContext.h" |
+#include "core/loader/WorkerFetchContext.h" |
#include "core/probe/CoreProbes.h" |
#include "core/workers/ParentFrameTaskRunners.h" |
#include "core/workers/SharedWorkerGlobalScope.h" |
@@ -339,6 +340,18 @@ void WebSharedWorkerImpl::OnScriptLoaderFinished() { |
web_security_origin))); |
ProvideIndexedDBClientToWorker(worker_clients, |
IndexedDBClientImpl::Create(*worker_clients)); |
+ |
+ std::unique_ptr<WebWorkerFetchContextInfo> web_worker_fetch_context_info = |
+ Platform::Current()->CreateWorkerFetchContextInfo(); |
+ // |web_worker_fetch_context_info| is null if off-main-thread-fetch is |
+ // disabled. |
+ if (web_worker_fetch_context_info) { |
+ // TODO(horo): Set more information about the context (ex: Service Worker |
+ // provider ID) to |web_worker_fetch_context_info|. |
+ ProvideWorkerFetchContextInfoToWorker( |
+ worker_clients, std::move(web_worker_fetch_context_info)); |
+ } |
+ |
ContentSecurityPolicy* content_security_policy = |
main_script_loader_->ReleaseContentSecurityPolicy(); |
WorkerThreadStartMode start_mode = |