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

Unified Diff: third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp

Issue 1873533002: [DevTools] Force context creation when runtime is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more tests Created 4 years, 8 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/core/inspector/WorkerThreadDebugger.cpp
diff --git a/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp b/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp
index 71c5f57e08cb6c99af8b1f9b3a5c90879f36230f..7741cd4b52a922c6c8877be69ce3542b8b6bf331 100644
--- a/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp
+++ b/third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp
@@ -30,6 +30,7 @@
#include "core/inspector/WorkerThreadDebugger.h"
+#include "bindings/core/v8/ScriptState.h"
#include "bindings/core/v8/V8ScriptRunner.h"
#include "core/inspector/WorkerDebuggerAgent.h"
#include "core/workers/WorkerThread.h"
@@ -60,7 +61,7 @@ WorkerThreadDebugger::~WorkerThreadDebugger()
void WorkerThreadDebugger::contextCreated(v8::Local<v8::Context> context)
{
- debugger()->contextCreated(V8ContextInfo(context, workerContextGroupId, true, true, m_workerThread->workerGlobalScope()->url().getString(), "", ""));
+ debugger()->contextCreated(V8ContextInfo(context, workerContextGroupId, true, m_workerThread->workerGlobalScope()->url().getString(), "", ""));
}
void WorkerThreadDebugger::contextWillBeDestroyed(v8::Local<v8::Context> context)
@@ -89,4 +90,14 @@ bool WorkerThreadDebugger::callingContextCanAccessContext(v8::Local<v8::Context>
return true;
}
+int WorkerThreadDebugger::ensureDefaultContextInGroup(int contextGroupId)
+{
+ ASSERT(contextGroupId == workerContextGroupId);
+ ScriptState* scriptState = m_workerThread->workerGlobalScope()->scriptController()->getScriptState();
+ if (!scriptState)
+ return 0;
+ v8::HandleScope scopes(scriptState->isolate());
+ return V8Debugger::contextId(scriptState->context());
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698