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

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

Issue 2842903002: [inspector] improved V8Debugger::breakProgram method (Closed)
Patch Set: rebased Created 3 years, 7 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') | test/inspector/debugger/destory-in-break-program.js » ('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 #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
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
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
OLDNEW
« no previous file with comments | « src/inspector/v8-debugger.cc ('k') | test/inspector/debugger/destory-in-break-program.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698