OLD | NEW |
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 #include "src/inspector/v8-debugger-agent-impl.h" | 5 #include "src/inspector/v8-debugger-agent-impl.h" |
6 | 6 |
| 7 #include <algorithm> |
| 8 |
7 #include "src/inspector/injected-script.h" | 9 #include "src/inspector/injected-script.h" |
8 #include "src/inspector/inspected-context.h" | 10 #include "src/inspector/inspected-context.h" |
9 #include "src/inspector/java-script-call-frame.h" | 11 #include "src/inspector/java-script-call-frame.h" |
10 #include "src/inspector/protocol/Protocol.h" | 12 #include "src/inspector/protocol/Protocol.h" |
11 #include "src/inspector/remote-object-id.h" | 13 #include "src/inspector/remote-object-id.h" |
12 #include "src/inspector/script-breakpoint.h" | 14 #include "src/inspector/script-breakpoint.h" |
13 #include "src/inspector/search-util.h" | 15 #include "src/inspector/search-util.h" |
14 #include "src/inspector/string-util.h" | 16 #include "src/inspector/string-util.h" |
15 #include "src/inspector/v8-debugger-script.h" | 17 #include "src/inspector/v8-debugger-script.h" |
16 #include "src/inspector/v8-debugger.h" | 18 #include "src/inspector/v8-debugger.h" |
17 #include "src/inspector/v8-inspector-impl.h" | 19 #include "src/inspector/v8-inspector-impl.h" |
18 #include "src/inspector/v8-inspector-session-impl.h" | 20 #include "src/inspector/v8-inspector-session-impl.h" |
19 #include "src/inspector/v8-regex.h" | 21 #include "src/inspector/v8-regex.h" |
20 #include "src/inspector/v8-runtime-agent-impl.h" | 22 #include "src/inspector/v8-runtime-agent-impl.h" |
21 #include "src/inspector/v8-stack-trace-impl.h" | 23 #include "src/inspector/v8-stack-trace-impl.h" |
22 | 24 |
23 #include "include/v8-inspector.h" | 25 #include "include/v8-inspector.h" |
24 | 26 |
25 #include <algorithm> | |
26 | |
27 namespace v8_inspector { | 27 namespace v8_inspector { |
28 | 28 |
29 using protocol::Array; | 29 using protocol::Array; |
30 using protocol::Maybe; | 30 using protocol::Maybe; |
31 using protocol::Debugger::BreakpointId; | 31 using protocol::Debugger::BreakpointId; |
32 using protocol::Debugger::CallFrame; | 32 using protocol::Debugger::CallFrame; |
33 using protocol::Runtime::ExceptionDetails; | 33 using protocol::Runtime::ExceptionDetails; |
34 using protocol::Runtime::ScriptId; | 34 using protocol::Runtime::ScriptId; |
35 using protocol::Runtime::StackTrace; | 35 using protocol::Runtime::StackTrace; |
36 using protocol::Runtime::RemoteObject; | 36 using protocol::Runtime::RemoteObject; |
37 | 37 |
38 namespace DebuggerAgentState { | 38 namespace DebuggerAgentState { |
39 static const char javaScriptBreakpoints[] = "javaScriptBreakopints"; | 39 static const char javaScriptBreakpoints[] = "javaScriptBreakopints"; |
40 static const char pauseOnExceptionsState[] = "pauseOnExceptionsState"; | 40 static const char pauseOnExceptionsState[] = "pauseOnExceptionsState"; |
41 static const char asyncCallStackDepth[] = "asyncCallStackDepth"; | 41 static const char asyncCallStackDepth[] = "asyncCallStackDepth"; |
42 static const char blackboxPattern[] = "blackboxPattern"; | 42 static const char blackboxPattern[] = "blackboxPattern"; |
43 static const char debuggerEnabled[] = "debuggerEnabled"; | 43 static const char debuggerEnabled[] = "debuggerEnabled"; |
44 | 44 |
45 // Breakpoint properties. | 45 // Breakpoint properties. |
46 static const char url[] = "url"; | 46 static const char url[] = "url"; |
47 static const char isRegex[] = "isRegex"; | 47 static const char isRegex[] = "isRegex"; |
48 static const char lineNumber[] = "lineNumber"; | 48 static const char lineNumber[] = "lineNumber"; |
49 static const char columnNumber[] = "columnNumber"; | 49 static const char columnNumber[] = "columnNumber"; |
50 static const char condition[] = "condition"; | 50 static const char condition[] = "condition"; |
51 static const char skipAllPauses[] = "skipAllPauses"; | 51 static const char skipAllPauses[] = "skipAllPauses"; |
52 | 52 |
53 } // namespace DebuggerAgentState; | 53 } // namespace DebuggerAgentState |
54 | 54 |
55 static const int maxSkipStepFrameCount = 128; | 55 static const int maxSkipStepFrameCount = 128; |
56 static const char backtraceObjectGroup[] = "backtrace"; | 56 static const char backtraceObjectGroup[] = "backtrace"; |
57 | 57 |
58 static String16 breakpointIdSuffix( | 58 static String16 breakpointIdSuffix( |
59 V8DebuggerAgentImpl::BreakpointSource source) { | 59 V8DebuggerAgentImpl::BreakpointSource source) { |
60 switch (source) { | 60 switch (source) { |
61 case V8DebuggerAgentImpl::UserBreakpointSource: | 61 case V8DebuggerAgentImpl::UserBreakpointSource: |
62 break; | 62 break; |
63 case V8DebuggerAgentImpl::DebugCommandBreakpointSource: | 63 case V8DebuggerAgentImpl::DebugCommandBreakpointSource: |
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1246 | 1246 |
1247 void V8DebuggerAgentImpl::reset() { | 1247 void V8DebuggerAgentImpl::reset() { |
1248 if (!enabled()) return; | 1248 if (!enabled()) return; |
1249 m_scheduledDebuggerStep = NoStep; | 1249 m_scheduledDebuggerStep = NoStep; |
1250 m_scripts.clear(); | 1250 m_scripts.clear(); |
1251 m_blackboxedPositions.clear(); | 1251 m_blackboxedPositions.clear(); |
1252 m_breakpointIdToDebuggerBreakpointIds.clear(); | 1252 m_breakpointIdToDebuggerBreakpointIds.clear(); |
1253 } | 1253 } |
1254 | 1254 |
1255 } // namespace v8_inspector | 1255 } // namespace v8_inspector |
OLD | NEW |