OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 void resetContextGroup(int contextGroupId) override; | 112 void resetContextGroup(int contextGroupId) override; |
113 PassOwnPtr<V8StackTrace> createStackTrace(v8::Local<v8::StackTrace>, size_t
maxStackSize) override; | 113 PassOwnPtr<V8StackTrace> createStackTrace(v8::Local<v8::StackTrace>, size_t
maxStackSize) override; |
114 PassOwnPtr<V8StackTrace> captureStackTrace(size_t maxStackSize) override; | 114 PassOwnPtr<V8StackTrace> captureStackTrace(size_t maxStackSize) override; |
115 | 115 |
116 using ContextByIdMap = protocol::HashMap<int, OwnPtr<InspectedContext>>; | 116 using ContextByIdMap = protocol::HashMap<int, OwnPtr<InspectedContext>>; |
117 void discardInspectedContext(int contextGroupId, int contextId); | 117 void discardInspectedContext(int contextGroupId, int contextId); |
118 const ContextByIdMap* contextGroup(int contextGroupId); | 118 const ContextByIdMap* contextGroup(int contextGroupId); |
119 void disconnect(V8InspectorSessionImpl*); | 119 void disconnect(V8InspectorSessionImpl*); |
120 V8InspectorSessionImpl* sessionForContextGroup(int contextGroupId); | 120 V8InspectorSessionImpl* sessionForContextGroup(int contextGroupId); |
121 | 121 |
| 122 v8::MaybeLocal<v8::FunctionTemplate> functionTemplate(const String16& name); |
| 123 void setFunctionTemplate(const String16& name, v8::Local<v8::FunctionTemplat
e>); |
| 124 |
122 private: | 125 private: |
123 void enable(); | 126 void enable(); |
124 void disable(); | 127 void disable(); |
125 V8DebuggerAgentImpl* findEnabledDebuggerAgent(int contextGroupId); | 128 V8DebuggerAgentImpl* findEnabledDebuggerAgent(int contextGroupId); |
126 V8DebuggerAgentImpl* findEnabledDebuggerAgent(v8::Local<v8::Context>); | 129 V8DebuggerAgentImpl* findEnabledDebuggerAgent(v8::Local<v8::Context>); |
127 | 130 |
128 void compileDebuggerScript(); | 131 void compileDebuggerScript(); |
129 v8::MaybeLocal<v8::Value> callDebuggerMethod(const char* functionName, int a
rgc, v8::Local<v8::Value> argv[]); | 132 v8::MaybeLocal<v8::Value> callDebuggerMethod(const char* functionName, int a
rgc, v8::Local<v8::Value> argv[]); |
130 v8::Local<v8::Context> debuggerContext() const; | 133 v8::Local<v8::Context> debuggerContext() const; |
131 void clearBreakpoints(); | 134 void clearBreakpoints(); |
(...skipping 18 matching lines...) Expand all Loading... |
150 SessionMap m_sessions; | 153 SessionMap m_sessions; |
151 int m_enabledAgentsCount; | 154 int m_enabledAgentsCount; |
152 bool m_breakpointsActivated; | 155 bool m_breakpointsActivated; |
153 v8::Global<v8::FunctionTemplate> m_breakProgramCallbackTemplate; | 156 v8::Global<v8::FunctionTemplate> m_breakProgramCallbackTemplate; |
154 v8::Global<v8::Object> m_debuggerScript; | 157 v8::Global<v8::Object> m_debuggerScript; |
155 v8::Global<v8::Context> m_debuggerContext; | 158 v8::Global<v8::Context> m_debuggerContext; |
156 v8::Local<v8::Object> m_executionState; | 159 v8::Local<v8::Object> m_executionState; |
157 v8::Local<v8::Context> m_pausedContext; | 160 v8::Local<v8::Context> m_pausedContext; |
158 bool m_runningNestedMessageLoop; | 161 bool m_runningNestedMessageLoop; |
159 v8::Global<v8::Context> m_regexContext; | 162 v8::Global<v8::Context> m_regexContext; |
| 163 using FunctionTemplateMap = protocol::HashMap<String16, OwnPtr<v8::Global<v8
::FunctionTemplate>>>; |
| 164 FunctionTemplateMap m_templates; |
160 }; | 165 }; |
161 | 166 |
162 } // namespace blink | 167 } // namespace blink |
163 | 168 |
164 | 169 |
165 #endif // V8DebuggerImpl_h | 170 #endif // V8DebuggerImpl_h |
OLD | NEW |