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> | 8 #include <vector> |
9 | 9 |
10 #include "src/base/macros.h" | 10 #include "src/base/macros.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 | 70 |
71 int maxAsyncCallChainDepth() { return m_maxAsyncCallStackDepth; } | 71 int maxAsyncCallChainDepth() { return m_maxAsyncCallStackDepth; } |
72 V8StackTraceImpl* currentAsyncCallChain(); | 72 V8StackTraceImpl* currentAsyncCallChain(); |
73 void setAsyncCallStackDepth(V8DebuggerAgentImpl*, int); | 73 void setAsyncCallStackDepth(V8DebuggerAgentImpl*, int); |
74 std::unique_ptr<V8StackTraceImpl> createStackTrace(v8::Local<v8::StackTrace>); | 74 std::unique_ptr<V8StackTraceImpl> createStackTrace(v8::Local<v8::StackTrace>); |
75 std::unique_ptr<V8StackTraceImpl> captureStackTrace(bool fullStack); | 75 std::unique_ptr<V8StackTraceImpl> captureStackTrace(bool fullStack); |
76 | 76 |
77 v8::MaybeLocal<v8::Array> internalProperties(v8::Local<v8::Context>, | 77 v8::MaybeLocal<v8::Array> internalProperties(v8::Local<v8::Context>, |
78 v8::Local<v8::Value>); | 78 v8::Local<v8::Value>); |
79 | 79 |
80 void asyncTaskCreated(void* task); | |
80 void asyncTaskScheduled(const StringView& taskName, void* task, | 81 void asyncTaskScheduled(const StringView& taskName, void* task, |
81 bool recurring); | 82 bool recurring); |
82 void asyncTaskScheduled(const String16& taskName, void* task, bool recurring); | 83 void asyncTaskScheduled(const String16& taskName, void* task, bool recurring); |
83 void asyncTaskCanceled(void* task); | 84 void asyncTaskCanceled(void* task); |
84 void asyncTaskStarted(void* task); | 85 void asyncTaskStarted(void* task); |
85 void asyncTaskFinished(void* task); | 86 void asyncTaskFinished(void* task); |
86 void allAsyncTasksCanceled(); | 87 void allAsyncTasksCanceled(); |
87 | 88 |
88 void muteScriptParsedEvents(); | 89 void muteScriptParsedEvents(); |
89 void unmuteScriptParsedEvents(); | 90 void unmuteScriptParsedEvents(); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
141 v8::Local<v8::Object> exec_state, | 142 v8::Local<v8::Object> exec_state, |
142 v8::Local<v8::Value> break_points_hit) override; | 143 v8::Local<v8::Value> break_points_hit) override; |
143 void ExceptionThrown(v8::Local<v8::Context> paused_context, | 144 void ExceptionThrown(v8::Local<v8::Context> paused_context, |
144 v8::Local<v8::Object> exec_state, | 145 v8::Local<v8::Object> exec_state, |
145 v8::Local<v8::Value> exception, | 146 v8::Local<v8::Value> exception, |
146 bool is_promise_rejection, bool is_uncaught) override; | 147 bool is_promise_rejection, bool is_uncaught) override; |
147 bool IsBlackboxed(v8::Local<v8::debug::Script> script, | 148 bool IsBlackboxed(v8::Local<v8::debug::Script> script, |
148 const v8::debug::Location& start, | 149 const v8::debug::Location& start, |
149 const v8::debug::Location& end) override; | 150 const v8::debug::Location& end) override; |
150 | 151 |
152 void registerAsyncTaskIfNeeded(void* task); | |
153 | |
151 v8::Isolate* m_isolate; | 154 v8::Isolate* m_isolate; |
152 V8InspectorImpl* m_inspector; | 155 V8InspectorImpl* m_inspector; |
153 int m_enableCount; | 156 int m_enableCount; |
154 bool m_breakpointsActivated; | 157 bool m_breakpointsActivated; |
155 v8::Global<v8::Object> m_debuggerScript; | 158 v8::Global<v8::Object> m_debuggerScript; |
156 v8::Global<v8::Context> m_debuggerContext; | 159 v8::Global<v8::Context> m_debuggerContext; |
157 v8::Local<v8::Object> m_executionState; | 160 v8::Local<v8::Object> m_executionState; |
158 v8::Local<v8::Context> m_pausedContext; | 161 v8::Local<v8::Context> m_pausedContext; |
159 bool m_runningNestedMessageLoop; | 162 bool m_runningNestedMessageLoop; |
160 int m_ignoreScriptParsedEventsCounter; | 163 int m_ignoreScriptParsedEventsCounter; |
161 bool m_scheduledOOMBreak = false; | 164 bool m_scheduledOOMBreak = false; |
162 | 165 |
163 using AsyncTaskToStackTrace = | 166 using AsyncTaskToStackTrace = |
164 protocol::HashMap<void*, std::unique_ptr<V8StackTraceImpl>>; | 167 protocol::HashMap<void*, std::unique_ptr<V8StackTraceImpl>>; |
165 AsyncTaskToStackTrace m_asyncTaskStacks; | 168 AsyncTaskToStackTrace m_asyncTaskStacks; |
169 AsyncTaskToStackTrace m_asyncTaskCreatedStacks; | |
dgozman
2017/01/24 01:02:41
m_asyncTaskCreationStacks
kozy
2017/01/24 21:43:39
Done.
| |
166 int m_maxAsyncCallStacks; | 170 int m_maxAsyncCallStacks; |
167 std::map<int, void*> m_idToTask; | 171 std::map<int, void*> m_idToTask; |
168 std::unordered_map<void*, int> m_taskToId; | 172 std::unordered_map<void*, int> m_taskToId; |
169 int m_lastTaskId; | 173 int m_lastTaskId; |
170 protocol::HashSet<void*> m_recurringTasks; | 174 protocol::HashSet<void*> m_recurringTasks; |
171 int m_maxAsyncCallStackDepth; | 175 int m_maxAsyncCallStackDepth; |
172 std::vector<void*> m_currentTasks; | 176 std::vector<void*> m_currentTasks; |
173 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks; | 177 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks; |
174 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; | 178 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; |
175 | 179 |
176 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; | 180 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; |
177 | 181 |
178 WasmTranslation m_wasmTranslation; | 182 WasmTranslation m_wasmTranslation; |
179 | 183 |
180 DISALLOW_COPY_AND_ASSIGN(V8Debugger); | 184 DISALLOW_COPY_AND_ASSIGN(V8Debugger); |
181 }; | 185 }; |
182 | 186 |
183 } // namespace v8_inspector | 187 } // namespace v8_inspector |
184 | 188 |
185 #endif // V8_INSPECTOR_V8DEBUGGER_H_ | 189 #endif // V8_INSPECTOR_V8DEBUGGER_H_ |
OLD | NEW |