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

Side by Side Diff: third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.cpp

Issue 2939773005: [POC] Implement "module responses map" concept (Closed)
Patch Set: rebase Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/workers/ThreadedWorkletMessagingProxy.h" 5 #include "core/workers/ThreadedWorkletMessagingProxy.h"
6 6
7 #include "bindings/core/v8/ScriptSourceCode.h" 7 #include "bindings/core/v8/ScriptSourceCode.h"
8 #include "bindings/core/v8/V8CacheOptions.h" 8 #include "bindings/core/v8/V8CacheOptions.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/dom/SecurityContext.h" 10 #include "core/dom/SecurityContext.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 script_url); 119 script_url);
120 } 120 }
121 121
122 DEFINE_TRACE(ThreadedWorkletMessagingProxy) { 122 DEFINE_TRACE(ThreadedWorkletMessagingProxy) {
123 visitor->Trace(loaders_); 123 visitor->Trace(loaders_);
124 ThreadedMessagingProxyBase::Trace(visitor); 124 ThreadedMessagingProxyBase::Trace(visitor);
125 } 125 }
126 126
127 void ThreadedWorkletMessagingProxy::FetchAndInvokeScript( 127 void ThreadedWorkletMessagingProxy::FetchAndInvokeScript(
128 const KURL& module_url_record, 128 const KURL& module_url_record,
129 WorkletModuleResponsesMap*,
129 WebURLRequest::FetchCredentialsMode credentials_mode, 130 WebURLRequest::FetchCredentialsMode credentials_mode,
130 RefPtr<WebTaskRunner> outside_settings_task_runner, 131 RefPtr<WebTaskRunner> outside_settings_task_runner,
131 WorkletPendingTasks* pending_tasks) { 132 WorkletPendingTasks* pending_tasks) {
132 DCHECK(IsMainThread()); 133 DCHECK(IsMainThread());
133 LoaderClient* client = new LoaderClient( 134 LoaderClient* client = new LoaderClient(
134 std::move(outside_settings_task_runner), pending_tasks, this); 135 std::move(outside_settings_task_runner), pending_tasks, this);
135 WorkletScriptLoader* loader = WorkletScriptLoader::Create( 136 WorkletScriptLoader* loader = WorkletScriptLoader::Create(
136 ToDocument(GetExecutionContext())->Fetcher(), client); 137 ToDocument(GetExecutionContext())->Fetcher(), client);
137 loaders_.insert(loader); 138 loaders_.insert(loader);
138 loader->FetchScript(module_url_record); 139 loader->FetchScript(module_url_record);
(...skipping 23 matching lines...) Expand all
162 TaskRunnerHelper::Get(TaskType::kMiscPlatformAPI, GetWorkerThread()) 163 TaskRunnerHelper::Get(TaskType::kMiscPlatformAPI, GetWorkerThread())
163 ->PostTask( 164 ->PostTask(
164 BLINK_FROM_HERE, 165 BLINK_FROM_HERE,
165 CrossThreadBind(&ThreadedWorkletObjectProxy::EvaluateScript, 166 CrossThreadBind(&ThreadedWorkletObjectProxy::EvaluateScript,
166 CrossThreadUnretained(worklet_object_proxy_.get()), 167 CrossThreadUnretained(worklet_object_proxy_.get()),
167 script_source_code.Source(), script_source_code.Url(), 168 script_source_code.Source(), script_source_code.Url(),
168 CrossThreadUnretained(GetWorkerThread()))); 169 CrossThreadUnretained(GetWorkerThread())));
169 } 170 }
170 171
171 } // namespace blink 172 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698