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

Unified Diff: third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.cpp

Issue 2811993007: Worker: Remove cross-thread PostTask functions from WorkerLoaderProxy (Closed)
Patch Set: address review comments 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/workers/ThreadedWorkletMessagingProxy.cpp
diff --git a/third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.cpp b/third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.cpp
index 7acd3137dfe4817b67a68e19591dbb5d18eba7ec..cf38c7bf066aa0296bf946b9d00c5807689826f9 100644
--- a/third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.cpp
@@ -7,6 +7,7 @@
#include "bindings/core/v8/ScriptSourceCode.h"
#include "core/dom/Document.h"
#include "core/dom/SecurityContext.h"
+#include "core/dom/TaskRunnerHelper.h"
#include "core/frame/csp/ContentSecurityPolicy.h"
#include "core/origin_trials/OriginTrialContext.h"
#include "core/workers/ThreadedWorkletObjectProxy.h"
@@ -58,12 +59,13 @@ void ThreadedWorkletMessagingProxy::Initialize() {
void ThreadedWorkletMessagingProxy::EvaluateScript(
const ScriptSourceCode& script_source_code) {
- PostTaskToWorkerGlobalScope(
- BLINK_FROM_HERE,
- CrossThreadBind(&ThreadedWorkletObjectProxy::EvaluateScript,
- CrossThreadUnretained(worklet_object_proxy_.get()),
- script_source_code.Source(), script_source_code.Url(),
- CrossThreadUnretained(GetWorkerThread())));
+ TaskRunnerHelper::Get(TaskType::kMiscPlatformAPI, GetWorkerThread())
haraken 2017/04/21 09:48:49 I'm not sure if this is a speced task though.
+ ->PostTask(
+ BLINK_FROM_HERE,
+ CrossThreadBind(&ThreadedWorkletObjectProxy::EvaluateScript,
+ CrossThreadUnretained(worklet_object_proxy_.get()),
+ script_source_code.Source(), script_source_code.Url(),
+ CrossThreadUnretained(GetWorkerThread())));
}
void ThreadedWorkletMessagingProxy::TerminateWorkletGlobalScope() {

Powered by Google App Engine
This is Rietveld 408576698