Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1561)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp

Issue 2498213002: [DevTools] contextCreated should be called when context initialization is done (Closed)
Patch Set: rebased Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698