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

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

Issue 2648873002: [inspector] added creation frame for async call chains for promises (Closed)
Patch Set: Created 3 years, 11 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
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 int maxAsyncCallChainDepth() { return m_maxAsyncCallStackDepth; } 72 int maxAsyncCallChainDepth() { return m_maxAsyncCallStackDepth; }
73 V8StackTraceImpl* currentAsyncCallChain(); 73 V8StackTraceImpl* currentAsyncCallChain();
74 void setAsyncCallStackDepth(V8DebuggerAgentImpl*, int); 74 void setAsyncCallStackDepth(V8DebuggerAgentImpl*, int);
75 std::unique_ptr<V8StackTraceImpl> createStackTrace(v8::Local<v8::StackTrace>); 75 std::unique_ptr<V8StackTraceImpl> createStackTrace(v8::Local<v8::StackTrace>);
76 std::unique_ptr<V8StackTraceImpl> captureStackTrace(bool fullStack); 76 std::unique_ptr<V8StackTraceImpl> captureStackTrace(bool fullStack);
77 77
78 v8::MaybeLocal<v8::Array> internalProperties(v8::Local<v8::Context>, 78 v8::MaybeLocal<v8::Array> internalProperties(v8::Local<v8::Context>,
79 v8::Local<v8::Value>); 79 v8::Local<v8::Value>);
80 80
81 void asyncTaskCreated(void* task);
81 void asyncTaskScheduled(const StringView& taskName, void* task, 82 void asyncTaskScheduled(const StringView& taskName, void* task,
82 bool recurring); 83 bool recurring);
83 void asyncTaskScheduled(const String16& taskName, void* task, bool recurring); 84 void asyncTaskScheduled(const String16& taskName, void* task, bool recurring);
84 void asyncTaskCanceled(void* task); 85 void asyncTaskCanceled(void* task);
85 void asyncTaskStarted(void* task); 86 void asyncTaskStarted(void* task);
86 void asyncTaskFinished(void* task); 87 void asyncTaskFinished(void* task);
87 void allAsyncTasksCanceled(); 88 void allAsyncTasksCanceled();
88 89
89 void muteScriptParsedEvents(); 90 void muteScriptParsedEvents();
90 void unmuteScriptParsedEvents(); 91 void unmuteScriptParsedEvents();
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void ScriptCompiled(v8::Local<v8::debug::Script> script, 140 void ScriptCompiled(v8::Local<v8::debug::Script> script,
140 bool has_compile_error) override; 141 bool has_compile_error) override;
141 void BreakProgramRequested(v8::Local<v8::Context> paused_context, 142 void BreakProgramRequested(v8::Local<v8::Context> paused_context,
142 v8::Local<v8::Object> exec_state, 143 v8::Local<v8::Object> exec_state,
143 v8::Local<v8::Value> break_points_hit) override; 144 v8::Local<v8::Value> break_points_hit) override;
144 void ExceptionThrown(v8::Local<v8::Context> paused_context, 145 void ExceptionThrown(v8::Local<v8::Context> paused_context,
145 v8::Local<v8::Object> exec_state, 146 v8::Local<v8::Object> exec_state,
146 v8::Local<v8::Value> exception, 147 v8::Local<v8::Value> exception,
147 bool is_promise_rejection, bool is_uncaught) override; 148 bool is_promise_rejection, bool is_uncaught) override;
148 149
150 void registerAsyncTaskIfNeeded(void* task);
151
149 v8::Isolate* m_isolate; 152 v8::Isolate* m_isolate;
150 V8InspectorImpl* m_inspector; 153 V8InspectorImpl* m_inspector;
151 int m_enableCount; 154 int m_enableCount;
152 bool m_breakpointsActivated; 155 bool m_breakpointsActivated;
153 v8::Global<v8::Object> m_debuggerScript; 156 v8::Global<v8::Object> m_debuggerScript;
154 v8::Global<v8::Context> m_debuggerContext; 157 v8::Global<v8::Context> m_debuggerContext;
155 v8::Local<v8::Object> m_executionState; 158 v8::Local<v8::Object> m_executionState;
156 v8::Local<v8::Context> m_pausedContext; 159 v8::Local<v8::Context> m_pausedContext;
157 bool m_runningNestedMessageLoop; 160 bool m_runningNestedMessageLoop;
158 int m_ignoreScriptParsedEventsCounter; 161 int m_ignoreScriptParsedEventsCounter;
159 bool m_scheduledOOMBreak = false; 162 bool m_scheduledOOMBreak = false;
160 163
161 using AsyncTaskToStackTrace = 164 using AsyncTaskToStackTrace =
162 protocol::HashMap<void*, std::unique_ptr<V8StackTraceImpl>>; 165 protocol::HashMap<void*, std::unique_ptr<V8StackTraceImpl>>;
163 AsyncTaskToStackTrace m_asyncTaskStacks; 166 AsyncTaskToStackTrace m_asyncTaskStacks;
167 AsyncTaskToStackTrace m_asyncTaskCreatedStacks;
164 int m_maxAsyncCallStacks; 168 int m_maxAsyncCallStacks;
165 std::map<int, void*> m_idToTask; 169 std::map<int, void*> m_idToTask;
166 std::unordered_map<void*, int> m_taskToId; 170 std::unordered_map<void*, int> m_taskToId;
167 int m_lastTaskId; 171 int m_lastTaskId;
168 protocol::HashSet<void*> m_recurringTasks; 172 protocol::HashSet<void*> m_recurringTasks;
169 int m_maxAsyncCallStackDepth; 173 int m_maxAsyncCallStackDepth;
170 std::vector<void*> m_currentTasks; 174 std::vector<void*> m_currentTasks;
171 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks; 175 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks;
172 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; 176 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap;
173 177
174 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; 178 v8::debug::ExceptionBreakState m_pauseOnExceptionsState;
175 179
176 WasmTranslation m_wasmTranslation; 180 WasmTranslation m_wasmTranslation;
177 181
178 DISALLOW_COPY_AND_ASSIGN(V8Debugger); 182 DISALLOW_COPY_AND_ASSIGN(V8Debugger);
179 }; 183 };
180 184
181 } // namespace v8_inspector 185 } // namespace v8_inspector
182 186
183 #endif // V8_INSPECTOR_V8DEBUGGER_H_ 187 #endif // V8_INSPECTOR_V8DEBUGGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698