| 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 2d0830781ca1562ae24f0df6d1751a4c9e49307f..af15442e09b76de01c8fae0031f9c364a3adbbbd 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp
|
| @@ -180,14 +180,6 @@ bool WorkerOrWorkletScriptController::initializeContextIfNeeded() {
|
|
|
| ScriptState::Scope scope(m_scriptState.get());
|
|
|
| - // Name new context for debugging. For main thread worklet global scopes
|
| - // this is done once the context is initialized.
|
| - if (m_globalScope->isWorkerGlobalScope() ||
|
| - m_globalScope->isThreadedWorkletGlobalScope()) {
|
| - WorkerThreadDebugger* debugger = WorkerThreadDebugger::from(m_isolate);
|
| - debugger->contextCreated(m_globalScope->thread(), context);
|
| - }
|
| -
|
| // The global proxy object. Note this is not the global object.
|
| v8::Local<v8::Object> globalProxy = context->Global();
|
| V8DOMWrapper::setNativeInfo(m_isolate, globalProxy, wrapperTypeInfo,
|
| @@ -203,6 +195,14 @@ bool WorkerOrWorkletScriptController::initializeContextIfNeeded() {
|
| // So we explicitly call constructorForType for the global object.
|
| V8PerContextData::from(context)->constructorForType(wrapperTypeInfo);
|
|
|
| + // Name new context for debugging. For main thread worklet global scopes
|
| + // this is done once the context is initialized.
|
| + if (m_globalScope->isWorkerGlobalScope() ||
|
| + m_globalScope->isThreadedWorkletGlobalScope()) {
|
| + WorkerThreadDebugger* debugger = WorkerThreadDebugger::from(m_isolate);
|
| + debugger->contextCreated(m_globalScope->thread(), context);
|
| + }
|
| +
|
| return true;
|
| }
|
|
|
|
|