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

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

Issue 2668763003: [inspector] V8DebuggerAgent cleanup (Closed)
Patch Set: 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_V8DEBUGGERAGENTIMPL_H_ 5 #ifndef V8_INSPECTOR_V8DEBUGGERAGENTIMPL_H_
6 #define V8_INSPECTOR_V8DEBUGGERAGENTIMPL_H_ 6 #define V8_INSPECTOR_V8DEBUGGERAGENTIMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "src/base/macros.h" 10 #include "src/base/macros.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 std::unique_ptr<protocol::DictionaryValue> data); 120 std::unique_ptr<protocol::DictionaryValue> data);
121 void cancelPauseOnNextStatement(); 121 void cancelPauseOnNextStatement();
122 void breakProgram(const String16& breakReason, 122 void breakProgram(const String16& breakReason,
123 std::unique_ptr<protocol::DictionaryValue> data); 123 std::unique_ptr<protocol::DictionaryValue> data);
124 void breakProgramOnException(const String16& breakReason, 124 void breakProgramOnException(const String16& breakReason,
125 std::unique_ptr<protocol::DictionaryValue> data); 125 std::unique_ptr<protocol::DictionaryValue> data);
126 126
127 void reset(); 127 void reset();
128 128
129 // Interface for V8InspectorImpl 129 // Interface for V8InspectorImpl
130 bool didPause(v8::Local<v8::Context>, v8::Local<v8::Value> exception, 130 void didPause(int contextId, v8::Local<v8::Value> exception,
131 const std::vector<String16>& hitBreakpoints, 131 const std::vector<String16>& hitBreakpoints,
132 bool isPromiseRejection, bool isUncaught, bool isOOMBreak); 132 bool isPromiseRejection, bool isUncaught, bool isOOMBreak);
133 void didContinue(); 133 void didContinue();
134 void didParseSource(std::unique_ptr<V8DebuggerScript>, bool success); 134 void didParseSource(std::unique_ptr<V8DebuggerScript>, bool success);
135 void willExecuteScript(int scriptId); 135 void willExecuteScript(int scriptId);
136 void didExecuteScript(); 136 void didExecuteScript();
137 137
138 bool isFunctionBlackboxed(const String16& scriptId, 138 bool isFunctionBlackboxed(const String16& scriptId,
139 const v8::debug::Location& start, 139 const v8::debug::Location& start,
140 const v8::debug::Location& end); 140 const v8::debug::Location& end);
(...skipping 17 matching lines...) Expand all
158 const String16& breakpointId, const ScriptBreakpoint&, BreakpointSource); 158 const String16& breakpointId, const ScriptBreakpoint&, BreakpointSource);
159 void removeBreakpointImpl(const String16& breakpointId); 159 void removeBreakpointImpl(const String16& breakpointId);
160 void clearBreakDetails(); 160 void clearBreakDetails();
161 161
162 void internalSetAsyncCallStackDepth(int); 162 void internalSetAsyncCallStackDepth(int);
163 void increaseCachedSkipStackGeneration(); 163 void increaseCachedSkipStackGeneration();
164 164
165 Response setBlackboxPattern(const String16& pattern); 165 Response setBlackboxPattern(const String16& pattern);
166 void resetBlackboxedStateCache(); 166 void resetBlackboxedStateCache();
167 167
168 bool isPaused() { return m_pausedCallFrames.size(); }
169
168 using ScriptsMap = 170 using ScriptsMap =
169 protocol::HashMap<String16, std::unique_ptr<V8DebuggerScript>>; 171 protocol::HashMap<String16, std::unique_ptr<V8DebuggerScript>>;
170 using BreakpointIdToDebuggerBreakpointIdsMap = 172 using BreakpointIdToDebuggerBreakpointIdsMap =
171 protocol::HashMap<String16, std::vector<String16>>; 173 protocol::HashMap<String16, std::vector<String16>>;
172 using DebugServerBreakpointToBreakpointIdAndSourceMap = 174 using DebugServerBreakpointToBreakpointIdAndSourceMap =
173 protocol::HashMap<String16, std::pair<String16, BreakpointSource>>; 175 protocol::HashMap<String16, std::pair<String16, BreakpointSource>>;
174 using MuteBreakpoins = protocol::HashMap<String16, std::pair<String16, int>>; 176 using MuteBreakpoins = protocol::HashMap<String16, std::pair<String16, int>>;
175 177
176 enum DebuggerStep { NoStep = 0, StepInto, StepOver, StepOut }; 178 enum DebuggerStep { NoStep = 0, StepInto, StepOver, StepOut };
177 179
178 V8InspectorImpl* m_inspector; 180 V8InspectorImpl* m_inspector;
179 V8Debugger* m_debugger; 181 V8Debugger* m_debugger;
180 V8InspectorSessionImpl* m_session; 182 V8InspectorSessionImpl* m_session;
181 bool m_enabled; 183 bool m_enabled;
182 protocol::DictionaryValue* m_state; 184 protocol::DictionaryValue* m_state;
183 protocol::Debugger::Frontend m_frontend; 185 protocol::Debugger::Frontend m_frontend;
184 v8::Isolate* m_isolate; 186 v8::Isolate* m_isolate;
185 v8::Global<v8::Context> m_pausedContext;
186 JavaScriptCallFrames m_pausedCallFrames; 187 JavaScriptCallFrames m_pausedCallFrames;
187 ScriptsMap m_scripts; 188 ScriptsMap m_scripts;
188 BreakpointIdToDebuggerBreakpointIdsMap m_breakpointIdToDebuggerBreakpointIds; 189 BreakpointIdToDebuggerBreakpointIdsMap m_breakpointIdToDebuggerBreakpointIds;
189 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints; 190 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints;
190 String16 m_continueToLocationBreakpointId; 191 String16 m_continueToLocationBreakpointId;
191 String16 m_breakReason; 192 String16 m_breakReason;
192 std::unique_ptr<protocol::DictionaryValue> m_breakAuxData; 193 std::unique_ptr<protocol::DictionaryValue> m_breakAuxData;
193 DebuggerStep m_scheduledDebuggerStep; 194 DebuggerStep m_scheduledDebuggerStep;
194 bool m_javaScriptPauseScheduled; 195 bool m_javaScriptPauseScheduled;
195 196
196 int m_recursionLevelForStepOut; 197 int m_recursionLevelForStepOut;
197 bool m_skipAllPauses; 198 bool m_skipAllPauses;
198 199
199 std::unique_ptr<V8Regex> m_blackboxPattern; 200 std::unique_ptr<V8Regex> m_blackboxPattern;
200 protocol::HashMap<String16, std::vector<std::pair<int, int>>> 201 protocol::HashMap<String16, std::vector<std::pair<int, int>>>
201 m_blackboxedPositions; 202 m_blackboxedPositions;
202 203
203 DISALLOW_COPY_AND_ASSIGN(V8DebuggerAgentImpl); 204 DISALLOW_COPY_AND_ASSIGN(V8DebuggerAgentImpl);
204 }; 205 };
205 206
206 } // namespace v8_inspector 207 } // namespace v8_inspector
207 208
208 #endif // V8_INSPECTOR_V8DEBUGGERAGENTIMPL_H_ 209 #endif // V8_INSPECTOR_V8DEBUGGERAGENTIMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698