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 71ffa46bb5884591ba1106ff7f10f88fc43efe64..49869ca12c78685df7097b23b41dab53296abeda 100644 |
--- a/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp |
+++ b/third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp |
@@ -80,10 +80,6 @@ RefPtr<WebTaskRunner> TaskRunnerHelper::Get( |
return Get(type, ToDocument(execution_context)); |
if (execution_context->IsDocument()) |
return Get(type, ToDocument(execution_context)); |
- if (execution_context->IsMainThreadWorkletGlobalScope()) { |
- return Get(type, |
- ToMainThreadWorkletGlobalScope(execution_context)->GetFrame()); |
- } |
if (execution_context->IsWorkerOrWorkletGlobalScope()) |
return Get(type, ToWorkerOrWorkletGlobalScope(execution_context)); |
execution_context = nullptr; |
@@ -101,6 +97,8 @@ RefPtr<WebTaskRunner> TaskRunnerHelper::Get( |
WorkerOrWorkletGlobalScope* global_scope) { |
DCHECK(global_scope); |
DCHECK(global_scope->IsContextThread()); |
+ if (global_scope->IsMainThreadWorkletGlobalScope()) |
+ return Get(type, ToMainThreadWorkletGlobalScope(global_scope)->GetFrame()); |
return Get(type, global_scope->GetThread()); |
} |