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

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

Issue 2925903002: [inspector] Make breakpoints active state per-agent (Closed)
Patch Set: fixed wrong behavior Created 3 years, 6 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/v8-debugger.cc ('k') | src/inspector/v8-debugger-agent-impl.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 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 std::unique_ptr<protocol::Runtime::CallArgument> newValue, 102 std::unique_ptr<protocol::Runtime::CallArgument> newValue,
103 const String16& callFrame) override; 103 const String16& callFrame) override;
104 Response setAsyncCallStackDepth(int depth) override; 104 Response setAsyncCallStackDepth(int depth) override;
105 Response setBlackboxPatterns( 105 Response setBlackboxPatterns(
106 std::unique_ptr<protocol::Array<String16>> patterns) override; 106 std::unique_ptr<protocol::Array<String16>> patterns) override;
107 Response setBlackboxedRanges( 107 Response setBlackboxedRanges(
108 const String16& scriptId, 108 const String16& scriptId,
109 std::unique_ptr<protocol::Array<protocol::Debugger::ScriptPosition>> 109 std::unique_ptr<protocol::Array<protocol::Debugger::ScriptPosition>>
110 positions) override; 110 positions) override;
111 111
112 bool enabled(); 112 bool enabled() const { return m_enabled; }
113 113
114 void setBreakpointAt(const String16& scriptId, int lineNumber, 114 void setBreakpointAt(const String16& scriptId, int lineNumber,
115 int columnNumber, BreakpointSource, 115 int columnNumber, BreakpointSource,
116 const String16& condition = String16()); 116 const String16& condition = String16());
117 void removeBreakpointAt(const String16& scriptId, int lineNumber, 117 void removeBreakpointAt(const String16& scriptId, int lineNumber,
118 int columnNumber, BreakpointSource); 118 int columnNumber, BreakpointSource);
119 void schedulePauseOnNextStatement( 119 void schedulePauseOnNextStatement(
120 const String16& breakReason, 120 const String16& breakReason,
121 std::unique_ptr<protocol::DictionaryValue> data); 121 std::unique_ptr<protocol::DictionaryValue> data);
122 void cancelPauseOnNextStatement(); 122 void cancelPauseOnNextStatement();
123 void breakProgram(const String16& breakReason, 123 void breakProgram(const String16& breakReason,
124 std::unique_ptr<protocol::DictionaryValue> data); 124 std::unique_ptr<protocol::DictionaryValue> data);
125 125
126 void reset(); 126 void reset();
127 127
128 // Interface for V8InspectorImpl 128 // Interface for V8InspectorImpl
129 void didPause(int contextId, v8::Local<v8::Value> exception, 129 void didPause(int contextId, v8::Local<v8::Value> exception,
130 const std::vector<String16>& hitBreakpoints, 130 const std::vector<String16>& hitBreakpoints,
131 bool isPromiseRejection, bool isUncaught, bool isOOMBreak, 131 bool isPromiseRejection, bool isUncaught, bool isOOMBreak,
132 bool isAssert); 132 bool isAssert);
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 135
136 bool isFunctionBlackboxed(const String16& scriptId, 136 bool isFunctionBlackboxed(const String16& scriptId,
137 const v8::debug::Location& start, 137 const v8::debug::Location& start,
138 const v8::debug::Location& end); 138 const v8::debug::Location& end);
139 139
140 bool skipAllPauses() const { return m_skipAllPauses; } 140 bool acceptsPause(bool isOOMBreak) const;
141 141
142 v8::Isolate* isolate() { return m_isolate; } 142 v8::Isolate* isolate() { return m_isolate; }
143 143
144 private: 144 private:
145 void enableImpl(); 145 void enableImpl();
146 146
147 Response currentCallFrames( 147 Response currentCallFrames(
148 std::unique_ptr<protocol::Array<protocol::Debugger::CallFrame>>*); 148 std::unique_ptr<protocol::Array<protocol::Debugger::CallFrame>>*);
149 std::unique_ptr<protocol::Runtime::StackTrace> currentAsyncStackTrace(); 149 std::unique_ptr<protocol::Runtime::StackTrace> currentAsyncStackTrace();
150 150
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 using BreakReason = 187 using BreakReason =
188 std::pair<String16, std::unique_ptr<protocol::DictionaryValue>>; 188 std::pair<String16, std::unique_ptr<protocol::DictionaryValue>>;
189 std::vector<BreakReason> m_breakReason; 189 std::vector<BreakReason> m_breakReason;
190 190
191 void pushBreakDetails( 191 void pushBreakDetails(
192 const String16& breakReason, 192 const String16& breakReason,
193 std::unique_ptr<protocol::DictionaryValue> breakAuxData); 193 std::unique_ptr<protocol::DictionaryValue> breakAuxData);
194 void popBreakDetails(); 194 void popBreakDetails();
195 195
196 bool m_skipAllPauses = false; 196 bool m_skipAllPauses = false;
197 bool m_breakpointsActive = false;
197 198
198 std::unique_ptr<V8Regex> m_blackboxPattern; 199 std::unique_ptr<V8Regex> m_blackboxPattern;
199 protocol::HashMap<String16, std::vector<std::pair<int, int>>> 200 protocol::HashMap<String16, std::vector<std::pair<int, int>>>
200 m_blackboxedPositions; 201 m_blackboxedPositions;
201 202
202 DISALLOW_COPY_AND_ASSIGN(V8DebuggerAgentImpl); 203 DISALLOW_COPY_AND_ASSIGN(V8DebuggerAgentImpl);
203 }; 204 };
204 205
205 } // namespace v8_inspector 206 } // namespace v8_inspector
206 207
207 #endif // V8_INSPECTOR_V8DEBUGGERAGENTIMPL_H_ 208 #endif // V8_INSPECTOR_V8DEBUGGERAGENTIMPL_H_
OLDNEW
« no previous file with comments | « src/inspector/v8-debugger.cc ('k') | src/inspector/v8-debugger-agent-impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698