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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp

Issue 2035653006: [DevTools] Move Console to v8 inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: improved api a bit Created 4 years, 6 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/platform/v8_inspector/V8RuntimeAgentImpl.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
index dd3ad6e2ca065816b40224833917ed883efc4767..d32cd3fec30d170d98e596b2a9498ef7cf2965be 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
@@ -87,11 +87,13 @@ void V8RuntimeAgentImpl::evaluate(
if (executionContextId.isJust()) {
contextId = executionContextId.fromJust();
} else {
- contextId = m_debugger->client()->ensureDefaultContextInGroup(m_session->contextGroupId());
- if (!contextId) {
+ v8::HandleScope handles(m_debugger->isolate());
+ v8::Local<v8::Context> defaultContext = m_debugger->client()->ensureDefaultContextInGroup(m_session->contextGroupId());
+ if (defaultContext.IsEmpty()) {
*errorString = "Cannot find default execution context";
return;
}
+ contextId = V8DebuggerImpl::contextId(defaultContext);
}
InjectedScript::ContextScope scope(errorString, m_debugger, m_session->contextGroupId(), contextId);

Powered by Google App Engine
This is Rietveld 408576698