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

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

Issue 1745253002: [Worklets] Add basic debugging to main thread worklets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix non-oilpan build. Created 4 years, 9 months 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
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 e0e0c22926d3ec4e2c66adee1f2214f7b689a18d..5e4d01f1e997ac1f49ef808f9c2573227a449b93 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"
@@ -148,8 +150,11 @@ bool WorkerOrWorkletScriptController::initializeContextIfNeeded()
ScriptState::Scope scope(m_scriptState.get());
- // Name new context for debugging.
- WorkerThreadDebugger::setContextDebugData(context);
+ // Name new context for debugging. For main thread worklet global scopes
+ // this is done once the context is initialized.
+ if (m_globalScope->isWorkerGlobalScope()) {
+ WorkerThreadDebugger::setContextDebugData(context);
+ }
// Create a new JS object and use it as the prototype for the shadow global object.
const WrapperTypeInfo* wrapperTypeInfo = m_globalScope->getScriptWrappable()->wrapperTypeInfo();
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp ('k') | third_party/WebKit/Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698