Index: third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp |
diff --git a/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp b/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp |
index 30c377d4117dc0377a97d072ba1726253bbaa60d..05dbf0c2daeee0c26116ad0cdc70ca343a8dfa3a 100644 |
--- a/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp |
+++ b/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp |
@@ -7,6 +7,7 @@ |
#include "core/dom/Document.h" |
#include "core/dom/ExecutionContext.h" |
#include "core/frame/LocalFrame.h" |
+#include "core/workers/MainThreadWorkletGlobalScope.h" |
#include "core/workers/WorkerOrWorkletGlobalScope.h" |
#include "core/workers/WorkerThread.h" |
#include "platform/WebFrameScheduler.h" |
@@ -71,6 +72,10 @@ RefPtr<WebTaskRunner> TaskRunnerHelper::Get( |
return Get(type, ToDocument(executionContext)); |
if (executionContext->IsDocument()) |
return Get(type, ToDocument(executionContext)); |
+ if (executionContext->IsMainThreadWorkletGlobalScope()) { |
+ return Get(type, |
+ ToMainThreadWorkletGlobalScope(executionContext)->GetFrame()); |
+ } |
if (executionContext->IsWorkerOrWorkletGlobalScope()) |
return Get(type, ToWorkerOrWorkletGlobalScope(executionContext)); |
executionContext = nullptr; |