| 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 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1243   m_frontend.resumed(); |  1243   m_frontend.resumed(); | 
|  1244 } |  1244 } | 
|  1245  |  1245  | 
|  1246 void V8DebuggerAgentImpl::breakProgram( |  1246 void V8DebuggerAgentImpl::breakProgram( | 
|  1247     const String16& breakReason, |  1247     const String16& breakReason, | 
|  1248     std::unique_ptr<protocol::DictionaryValue> data) { |  1248     std::unique_ptr<protocol::DictionaryValue> data) { | 
|  1249   if (!enabled() || !m_debugger->canBreakProgram() || m_skipAllPauses) return; |  1249   if (!enabled() || !m_debugger->canBreakProgram() || m_skipAllPauses) return; | 
|  1250   std::vector<BreakReason> currentScheduledReason; |  1250   std::vector<BreakReason> currentScheduledReason; | 
|  1251   currentScheduledReason.swap(m_breakReason); |  1251   currentScheduledReason.swap(m_breakReason); | 
|  1252   pushBreakDetails(breakReason, std::move(data)); |  1252   pushBreakDetails(breakReason, std::move(data)); | 
|  1253   m_debugger->breakProgram(); |  1253   if (!m_debugger->breakProgram(m_session->contextGroupId())) return; | 
|  1254   popBreakDetails(); |  1254   popBreakDetails(); | 
|  1255   m_breakReason.swap(currentScheduledReason); |  1255   m_breakReason.swap(currentScheduledReason); | 
|  1256   if (!m_breakReason.empty()) { |  1256   if (!m_breakReason.empty()) { | 
|  1257     m_debugger->setPauseOnNextStatement(true, m_session->contextGroupId()); |  1257     m_debugger->setPauseOnNextStatement(true, m_session->contextGroupId()); | 
|  1258   } |  1258   } | 
|  1259 } |  1259 } | 
|  1260  |  1260  | 
|  1261 void V8DebuggerAgentImpl::breakProgramOnException( |  1261 void V8DebuggerAgentImpl::breakProgramOnException( | 
|  1262     const String16& breakReason, |  1262     const String16& breakReason, | 
|  1263     std::unique_ptr<protocol::DictionaryValue> data) { |  1263     std::unique_ptr<protocol::DictionaryValue> data) { | 
| (...skipping 22 matching lines...) Expand all  Loading... | 
|  1286  |  1286  | 
|  1287 void V8DebuggerAgentImpl::reset() { |  1287 void V8DebuggerAgentImpl::reset() { | 
|  1288   if (!enabled()) return; |  1288   if (!enabled()) return; | 
|  1289   m_blackboxedPositions.clear(); |  1289   m_blackboxedPositions.clear(); | 
|  1290   resetBlackboxedStateCache(); |  1290   resetBlackboxedStateCache(); | 
|  1291   m_scripts.clear(); |  1291   m_scripts.clear(); | 
|  1292   m_breakpointIdToDebuggerBreakpointIds.clear(); |  1292   m_breakpointIdToDebuggerBreakpointIds.clear(); | 
|  1293 } |  1293 } | 
|  1294  |  1294  | 
|  1295 }  // namespace v8_inspector |  1295 }  // namespace v8_inspector | 
| OLD | NEW |