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

Side by Side Diff: src/inspector/v8-debugger.h

Issue 2648873002: [inspector] added creation frame for async call chains for promises (Closed)
Patch Set: add test for setTimeout Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « src/inspector/js_protocol.json ('k') | src/inspector/v8-debugger.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 v8::MaybeLocal<v8::Value> getTargetScopes(v8::Local<v8::Context>, 126 v8::MaybeLocal<v8::Value> getTargetScopes(v8::Local<v8::Context>,
127 v8::Local<v8::Value>, 127 v8::Local<v8::Value>,
128 ScopeTargetKind); 128 ScopeTargetKind);
129 129
130 v8::MaybeLocal<v8::Value> functionScopes(v8::Local<v8::Context>, 130 v8::MaybeLocal<v8::Value> functionScopes(v8::Local<v8::Context>,
131 v8::Local<v8::Function>); 131 v8::Local<v8::Function>);
132 v8::MaybeLocal<v8::Value> generatorScopes(v8::Local<v8::Context>, 132 v8::MaybeLocal<v8::Value> generatorScopes(v8::Local<v8::Context>,
133 v8::Local<v8::Value>); 133 v8::Local<v8::Value>);
134 134
135 void asyncTaskCreated(void* task, void* parentTask); 135 void asyncTaskCreated(void* task, void* parentTask);
136 void registerAsyncTaskIfNeeded(void* task);
136 137
137 // v8::debug::DebugEventListener implementation. 138 // v8::debug::DebugEventListener implementation.
138 void PromiseEventOccurred(v8::debug::PromiseDebugActionType type, int id, 139 void PromiseEventOccurred(v8::debug::PromiseDebugActionType type, int id,
139 int parentId) override; 140 int parentId) override;
140 void ScriptCompiled(v8::Local<v8::debug::Script> script, 141 void ScriptCompiled(v8::Local<v8::debug::Script> script,
141 bool has_compile_error) override; 142 bool has_compile_error) override;
142 void BreakProgramRequested(v8::Local<v8::Context> paused_context, 143 void BreakProgramRequested(v8::Local<v8::Context> paused_context,
143 v8::Local<v8::Object> exec_state, 144 v8::Local<v8::Object> exec_state,
144 v8::Local<v8::Value> break_points_hit) override; 145 v8::Local<v8::Value> break_points_hit) override;
145 void ExceptionThrown(v8::Local<v8::Context> paused_context, 146 void ExceptionThrown(v8::Local<v8::Context> paused_context,
(...skipping 12 matching lines...) Expand all
158 v8::Global<v8::Context> m_debuggerContext; 159 v8::Global<v8::Context> m_debuggerContext;
159 v8::Local<v8::Object> m_executionState; 160 v8::Local<v8::Object> m_executionState;
160 v8::Local<v8::Context> m_pausedContext; 161 v8::Local<v8::Context> m_pausedContext;
161 bool m_runningNestedMessageLoop; 162 bool m_runningNestedMessageLoop;
162 int m_ignoreScriptParsedEventsCounter; 163 int m_ignoreScriptParsedEventsCounter;
163 bool m_scheduledOOMBreak = false; 164 bool m_scheduledOOMBreak = false;
164 165
165 using AsyncTaskToStackTrace = 166 using AsyncTaskToStackTrace =
166 protocol::HashMap<void*, std::unique_ptr<V8StackTraceImpl>>; 167 protocol::HashMap<void*, std::unique_ptr<V8StackTraceImpl>>;
167 AsyncTaskToStackTrace m_asyncTaskStacks; 168 AsyncTaskToStackTrace m_asyncTaskStacks;
169 AsyncTaskToStackTrace m_asyncTaskCreationStacks;
168 int m_maxAsyncCallStacks; 170 int m_maxAsyncCallStacks;
169 std::map<int, void*> m_idToTask; 171 std::map<int, void*> m_idToTask;
170 std::unordered_map<void*, int> m_taskToId; 172 std::unordered_map<void*, int> m_taskToId;
171 int m_lastTaskId; 173 int m_lastTaskId;
172 protocol::HashSet<void*> m_recurringTasks; 174 protocol::HashSet<void*> m_recurringTasks;
173 int m_maxAsyncCallStackDepth; 175 int m_maxAsyncCallStackDepth;
174 std::vector<void*> m_currentTasks; 176 std::vector<void*> m_currentTasks;
175 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks; 177 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks;
176 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; 178 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap;
177 protocol::HashMap<void*, void*> m_parentTask; 179 protocol::HashMap<void*, void*> m_parentTask;
178 180
179 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; 181 v8::debug::ExceptionBreakState m_pauseOnExceptionsState;
180 182
181 WasmTranslation m_wasmTranslation; 183 WasmTranslation m_wasmTranslation;
182 184
183 DISALLOW_COPY_AND_ASSIGN(V8Debugger); 185 DISALLOW_COPY_AND_ASSIGN(V8Debugger);
184 }; 186 };
185 187
186 } // namespace v8_inspector 188 } // namespace v8_inspector
187 189
188 #endif // V8_INSPECTOR_V8DEBUGGER_H_ 190 #endif // V8_INSPECTOR_V8DEBUGGER_H_
OLDNEW
« no previous file with comments | « src/inspector/js_protocol.json ('k') | src/inspector/v8-debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698