OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_INSPECTOR_V8DEBUGGER_H_ | 5 #ifndef V8_INSPECTOR_V8DEBUGGER_H_ |
6 #define V8_INSPECTOR_V8DEBUGGER_H_ | 6 #define V8_INSPECTOR_V8DEBUGGER_H_ |
7 | 7 |
| 8 #include <vector> |
| 9 |
8 #include "src/base/macros.h" | 10 #include "src/base/macros.h" |
9 #include "src/inspector/java-script-call-frame.h" | 11 #include "src/inspector/java-script-call-frame.h" |
10 #include "src/inspector/protocol/Forward.h" | 12 #include "src/inspector/protocol/Forward.h" |
11 #include "src/inspector/protocol/Runtime.h" | 13 #include "src/inspector/protocol/Runtime.h" |
12 #include "src/inspector/v8-debugger-script.h" | 14 #include "src/inspector/v8-debugger-script.h" |
13 | 15 |
14 #include "include/v8-debug.h" | 16 #include "include/v8-debug.h" |
15 #include "include/v8-inspector.h" | 17 #include "include/v8-inspector.h" |
16 | 18 |
17 #include <vector> | |
18 | |
19 namespace v8_inspector { | 19 namespace v8_inspector { |
20 | 20 |
21 struct ScriptBreakpoint; | 21 struct ScriptBreakpoint; |
22 class V8DebuggerAgentImpl; | 22 class V8DebuggerAgentImpl; |
23 class V8InspectorImpl; | 23 class V8InspectorImpl; |
24 class V8StackTraceImpl; | 24 class V8StackTraceImpl; |
25 | 25 |
26 using protocol::ErrorString; | 26 using protocol::ErrorString; |
27 | 27 |
28 class V8Debugger { | 28 class V8Debugger { |
29 DISALLOW_COPY_AND_ASSIGN(V8Debugger); | |
30 | |
31 public: | 29 public: |
32 V8Debugger(v8::Isolate*, V8InspectorImpl*); | 30 V8Debugger(v8::Isolate*, V8InspectorImpl*); |
33 ~V8Debugger(); | 31 ~V8Debugger(); |
34 | 32 |
35 static int contextId(v8::Local<v8::Context>); | 33 static int contextId(v8::Local<v8::Context>); |
36 static int getGroupId(v8::Local<v8::Context>); | 34 static int getGroupId(v8::Local<v8::Context>); |
37 int markContext(const V8ContextInfo&); | 35 int markContext(const V8ContextInfo&); |
38 | 36 |
39 bool enabled() const; | 37 bool enabled() const; |
40 | 38 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 int m_ignoreScriptParsedEventsCounter; | 144 int m_ignoreScriptParsedEventsCounter; |
147 | 145 |
148 using AsyncTaskToStackTrace = | 146 using AsyncTaskToStackTrace = |
149 protocol::HashMap<void*, std::unique_ptr<V8StackTraceImpl>>; | 147 protocol::HashMap<void*, std::unique_ptr<V8StackTraceImpl>>; |
150 AsyncTaskToStackTrace m_asyncTaskStacks; | 148 AsyncTaskToStackTrace m_asyncTaskStacks; |
151 protocol::HashSet<void*> m_recurringTasks; | 149 protocol::HashSet<void*> m_recurringTasks; |
152 int m_maxAsyncCallStackDepth; | 150 int m_maxAsyncCallStackDepth; |
153 std::vector<void*> m_currentTasks; | 151 std::vector<void*> m_currentTasks; |
154 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks; | 152 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks; |
155 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; | 153 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; |
| 154 |
| 155 DISALLOW_COPY_AND_ASSIGN(V8Debugger); |
156 }; | 156 }; |
157 | 157 |
158 } // namespace v8_inspector | 158 } // namespace v8_inspector |
159 | 159 |
160 #endif // V8_INSPECTOR_V8DEBUGGER_H_ | 160 #endif // V8_INSPECTOR_V8DEBUGGER_H_ |
OLD | NEW |