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

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

Issue 1859293002: [DevTools] Move Console to v8_inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/platform/v8_inspector/V8DebuggerImpl.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp
index 19255d87f048abb839d7996486e5296d7f828553..14a198781e11066b65c3b3681fb688c3e503f3d8 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp
@@ -37,6 +37,7 @@
#include "platform/v8_inspector/ScriptBreakpoint.h"
#include "platform/v8_inspector/V8DebuggerAgentImpl.h"
#include "platform/v8_inspector/V8InspectorSessionImpl.h"
+#include "platform/v8_inspector/V8ProfilerAgentImpl.h"
dgozman 2016/04/12 23:21:58 unused?
kozy 2016/04/12 23:34:26 Done.
#include "platform/v8_inspector/V8RuntimeAgentImpl.h"
#include "platform/v8_inspector/V8StackTraceImpl.h"
#include "platform/v8_inspector/V8StringUtil.h"
@@ -770,7 +771,7 @@ void V8DebuggerImpl::contextCreated(const V8ContextInfo& info)
m_contexts.set(info.contextGroupId, adoptPtr(new ContextByIdMap()));
ASSERT(!m_contexts.get(info.contextGroupId)->contains(contextId));
- OwnPtr<InspectedContext> contextOwner = adoptPtr(new InspectedContext(this, info, contextId));
+ OwnPtr<InspectedContext> contextOwner = adoptPtr(new InspectedContext(this, info, contextId, info.hasMemoryOnConsole));
InspectedContext* inspectedContext = contextOwner.get();
m_contexts.get(info.contextGroupId)->set(contextId, contextOwner.release());
@@ -835,4 +836,17 @@ V8InspectorSessionImpl* V8DebuggerImpl::sessionForContextGroup(int contextGroupI
return contextGroupId ? m_sessions.get(contextGroupId) : nullptr;
}
+v8::MaybeLocal<v8::FunctionTemplate> V8DebuggerImpl::functionTemplate(const String16& name)
+{
+ if (!m_templates.contains(name))
+ return v8::MaybeLocal<v8::FunctionTemplate>();
+ return v8::Local<v8::FunctionTemplate>::New(m_isolate, *m_templates.get(name));
dgozman 2016/04/12 23:21:58 global has .Get(isolate)
kozy 2016/04/12 23:34:26 Done.
+}
+
+void V8DebuggerImpl::setFunctionTemplate(const String16& name, v8::Local<v8::FunctionTemplate> functionTemplate)
+{
+ OwnPtr<v8::Global<v8::FunctionTemplate>> global = adoptPtr(new v8::Global<v8::FunctionTemplate>(m_isolate, functionTemplate));
+ m_templates.set(name, global.release());
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698