Index: third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.cpp |
diff --git a/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.cpp b/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.cpp |
index 5ae838b150bbfba3784b01c9b5f45b530a90a50f..30c0598c0c19fc9730cddda8645d3b77de074663 100644 |
--- a/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.cpp |
+++ b/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.cpp |
@@ -5,6 +5,7 @@ |
#include "core/workers/WorkerOrWorkletGlobalScope.h" |
#include "core/dom/ExecutionContextTask.h" |
+#include "core/dom/TaskRunnerHelper.h" |
#include "core/frame/Deprecation.h" |
#include "core/inspector/ConsoleMessage.h" |
#include "core/probe/CoreProbes.h" |
@@ -37,7 +38,7 @@ void WorkerOrWorkletGlobalScope::addDeprecationMessage( |
} |
void WorkerOrWorkletGlobalScope::postTask( |
- TaskType, |
+ TaskType type, |
const WebTraceLocation& location, |
std::unique_ptr<ExecutionContextTask> task, |
const String& taskNameForInstrumentation) { |
@@ -49,10 +50,11 @@ void WorkerOrWorkletGlobalScope::postTask( |
probe::asyncTaskScheduled(this, "Worker task", task.get()); |
} |
- thread()->postTask( |
- location, crossThreadBind(&WorkerOrWorkletGlobalScope::runTask, |
- wrapCrossThreadWeakPersistent(this), |
- WTF::passed(std::move(task)), isInstrumented)); |
+ TaskRunnerHelper::get(type, this) |
+ ->postTask(location, |
+ crossThreadBind(&WorkerOrWorkletGlobalScope::runTask, |
+ wrapCrossThreadWeakPersistent(this), |
+ WTF::passed(std::move(task)), isInstrumented)); |
} |
void WorkerOrWorkletGlobalScope::runTask( |