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

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

Issue 2738503006: [inspector] don't make v8::debug::Call for breakProgram. (Closed)
Patch Set: addressed comments Created 3 years, 9 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/runtime/runtime-debug.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 #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 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 const String16& breakReason, 1302 const String16& breakReason,
1303 std::unique_ptr<protocol::DictionaryValue> data) { 1303 std::unique_ptr<protocol::DictionaryValue> data) {
1304 if (!enabled() || !m_debugger->canBreakProgram() || m_skipAllPauses) return; 1304 if (!enabled() || !m_debugger->canBreakProgram() || m_skipAllPauses) return;
1305 std::vector<BreakReason> currentScheduledReason; 1305 std::vector<BreakReason> currentScheduledReason;
1306 currentScheduledReason.swap(m_breakReason); 1306 currentScheduledReason.swap(m_breakReason);
1307 pushBreakDetails(breakReason, std::move(data)); 1307 pushBreakDetails(breakReason, std::move(data));
1308 m_scheduledDebuggerStep = NoStep; 1308 m_scheduledDebuggerStep = NoStep;
1309 m_debugger->breakProgram(); 1309 m_debugger->breakProgram();
1310 popBreakDetails(); 1310 popBreakDetails();
1311 m_breakReason.swap(currentScheduledReason); 1311 m_breakReason.swap(currentScheduledReason);
1312 if (!m_breakReason.empty()) {
1313 m_debugger->setPauseOnNextStatement(true);
1314 }
1312 } 1315 }
1313 1316
1314 void V8DebuggerAgentImpl::breakProgramOnException( 1317 void V8DebuggerAgentImpl::breakProgramOnException(
1315 const String16& breakReason, 1318 const String16& breakReason,
1316 std::unique_ptr<protocol::DictionaryValue> data) { 1319 std::unique_ptr<protocol::DictionaryValue> data) {
1317 if (!enabled() || 1320 if (!enabled() ||
1318 m_debugger->getPauseOnExceptionsState() == v8::debug::NoBreakOnException) 1321 m_debugger->getPauseOnExceptionsState() == v8::debug::NoBreakOnException)
1319 return; 1322 return;
1320 breakProgram(breakReason, std::move(data)); 1323 breakProgram(breakReason, std::move(data));
1321 } 1324 }
(...skipping 18 matching lines...) Expand all
1340 void V8DebuggerAgentImpl::reset() { 1343 void V8DebuggerAgentImpl::reset() {
1341 if (!enabled()) return; 1344 if (!enabled()) return;
1342 m_scheduledDebuggerStep = NoStep; 1345 m_scheduledDebuggerStep = NoStep;
1343 m_blackboxedPositions.clear(); 1346 m_blackboxedPositions.clear();
1344 resetBlackboxedStateCache(); 1347 resetBlackboxedStateCache();
1345 m_scripts.clear(); 1348 m_scripts.clear();
1346 m_breakpointIdToDebuggerBreakpointIds.clear(); 1349 m_breakpointIdToDebuggerBreakpointIds.clear();
1347 } 1350 }
1348 1351
1349 } // namespace v8_inspector 1352 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « src/inspector/v8-debugger.cc ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698