| Index: third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp b/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp
|
| index fbdbb4dbbe68963974ee9ffd3128cf9cb8af8d41..5ff9473169a3c2df4872c72c6a69bfc97c040484 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp
|
| @@ -43,7 +43,9 @@
|
| #include "bindings/core/v8/WrapperTypeInfo.h"
|
| #include "core/events/ErrorEvent.h"
|
| #include "core/frame/DOMTimer.h"
|
| +#include "core/inspector/MainThreadDebugger.h"
|
| #include "core/inspector/WorkerThreadDebugger.h"
|
| +#include "core/workers/MainThreadWorkletGlobalScope.h"
|
| #include "core/workers/WorkerObjectProxy.h"
|
| #include "core/workers/WorkerOrWorkletGlobalScope.h"
|
| #include "core/workers/WorkerThread.h"
|
| @@ -149,7 +151,11 @@ bool WorkerOrWorkletScriptController::initializeContextIfNeeded()
|
| ScriptState::Scope scope(m_scriptState.get());
|
|
|
| // Name new context for debugging.
|
| - WorkerThreadDebugger::setContextDebugData(context);
|
| + if (m_globalScope->isWorkletGlobalScope()) {
|
| + MainThreadDebugger::initializeContext(context, toMainThreadWorkletGlobalScope(m_globalScope)->frame(), WorkerWorldId);
|
| + } else {
|
| + WorkerThreadDebugger::setContextDebugData(context);
|
| + }
|
|
|
| // Create a new JS object and use it as the prototype for the shadow global object.
|
| const WrapperTypeInfo* wrapperTypeInfo = m_globalScope->scriptWrappable()->wrapperTypeInfo();
|
|
|