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 5e3f3d7f13d4fb5e295e472d523032fc120200e8..addfc757b3586e7758e30bbbf18f717c5687c59a 100644 |
--- a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp |
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp |
@@ -831,4 +831,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 m_templates.get(name)->Get(m_isolate); |
+} |
+ |
+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 |