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> | 7 #include <algorithm> |
8 | 8 |
9 #include "src/debug/debug-interface.h" | 9 #include "src/debug/debug-interface.h" |
10 #include "src/inspector/injected-script.h" | 10 #include "src/inspector/injected-script.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 return ":debug"; | 69 return ":debug"; |
70 case V8DebuggerAgentImpl::MonitorCommandBreakpointSource: | 70 case V8DebuggerAgentImpl::MonitorCommandBreakpointSource: |
71 return ":monitor"; | 71 return ":monitor"; |
72 } | 72 } |
73 return String16(); | 73 return String16(); |
74 } | 74 } |
75 | 75 |
76 static String16 generateBreakpointId( | 76 static String16 generateBreakpointId( |
77 const String16& scriptId, int lineNumber, int columnNumber, | 77 const String16& scriptId, int lineNumber, int columnNumber, |
78 V8DebuggerAgentImpl::BreakpointSource source) { | 78 V8DebuggerAgentImpl::BreakpointSource source) { |
79 return scriptId + ":" + String16::fromInteger(lineNumber) + ":" + | 79 return String16::concat(scriptId, ':', lineNumber, ':', columnNumber, |
80 String16::fromInteger(columnNumber) + breakpointIdSuffix(source); | 80 breakpointIdSuffix(source)); |
81 } | 81 } |
82 | 82 |
83 static bool positionComparator(const std::pair<int, int>& a, | 83 static bool positionComparator(const std::pair<int, int>& a, |
84 const std::pair<int, int>& b) { | 84 const std::pair<int, int>& b) { |
85 if (a.first != b.first) return a.first < b.first; | 85 if (a.first != b.first) return a.first < b.first; |
86 return a.second < b.second; | 86 return a.second < b.second; |
87 } | 87 } |
88 | 88 |
89 static std::unique_ptr<protocol::Debugger::Location> buildProtocolLocation( | 89 static std::unique_ptr<protocol::Debugger::Location> buildProtocolLocation( |
90 const String16& scriptId, int lineNumber, int columnNumber) { | 90 const String16& scriptId, int lineNumber, int columnNumber) { |
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1224 | 1224 |
1225 void V8DebuggerAgentImpl::reset() { | 1225 void V8DebuggerAgentImpl::reset() { |
1226 if (!enabled()) return; | 1226 if (!enabled()) return; |
1227 m_scheduledDebuggerStep = NoStep; | 1227 m_scheduledDebuggerStep = NoStep; |
1228 m_scripts.clear(); | 1228 m_scripts.clear(); |
1229 m_blackboxedPositions.clear(); | 1229 m_blackboxedPositions.clear(); |
1230 m_breakpointIdToDebuggerBreakpointIds.clear(); | 1230 m_breakpointIdToDebuggerBreakpointIds.clear(); |
1231 } | 1231 } |
1232 | 1232 |
1233 } // namespace v8_inspector | 1233 } // namespace v8_inspector |
OLD | NEW |