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

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

Issue 2758483002: [debugger] tuned StepNext and StepOut at return position (Closed)
Patch Set: 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/debug/debug.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 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 if (!isPaused()) return Response::Error(kDebuggerNotPaused); 724 if (!isPaused()) return Response::Error(kDebuggerNotPaused);
725 m_scheduledDebuggerStep = NoStep; 725 m_scheduledDebuggerStep = NoStep;
726 m_session->releaseObjectGroup(kBacktraceObjectGroup); 726 m_session->releaseObjectGroup(kBacktraceObjectGroup);
727 m_debugger->continueProgram(); 727 m_debugger->continueProgram();
728 return Response::OK(); 728 return Response::OK();
729 } 729 }
730 730
731 Response V8DebuggerAgentImpl::stepOver() { 731 Response V8DebuggerAgentImpl::stepOver() {
732 if (!isPaused()) return Response::Error(kDebuggerNotPaused); 732 if (!isPaused()) return Response::Error(kDebuggerNotPaused);
733 // StepOver at function return point should fallback to StepInto. 733 // StepOver at function return point should fallback to StepInto.
734 JavaScriptCallFrame* frame = 734 // JavaScriptCallFrame* frame =
kozy 2017/03/16 07:19:00 I can remove it in this CL since we use to step be
735 !m_pausedCallFrames.empty() ? m_pausedCallFrames[0].get() : nullptr; 735 // !m_pausedCallFrames.empty() ? m_pausedCallFrames[0].get() : nullptr;
736 if (frame && frame->isAtReturn()) return stepInto(); 736 // if (frame && frame->isAtReturn()) return stepInto();
737 m_scheduledDebuggerStep = StepOver; 737 m_scheduledDebuggerStep = StepOver;
738 m_session->releaseObjectGroup(kBacktraceObjectGroup); 738 m_session->releaseObjectGroup(kBacktraceObjectGroup);
739 m_debugger->stepOverStatement(); 739 m_debugger->stepOverStatement();
740 return Response::OK(); 740 return Response::OK();
741 } 741 }
742 742
743 Response V8DebuggerAgentImpl::stepInto() { 743 Response V8DebuggerAgentImpl::stepInto() {
744 if (!isPaused()) return Response::Error(kDebuggerNotPaused); 744 if (!isPaused()) return Response::Error(kDebuggerNotPaused);
745 m_scheduledDebuggerStep = StepInto; 745 m_scheduledDebuggerStep = StepInto;
746 m_session->releaseObjectGroup(kBacktraceObjectGroup); 746 m_session->releaseObjectGroup(kBacktraceObjectGroup);
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 void V8DebuggerAgentImpl::reset() { 1343 void V8DebuggerAgentImpl::reset() {
1344 if (!enabled()) return; 1344 if (!enabled()) return;
1345 m_scheduledDebuggerStep = NoStep; 1345 m_scheduledDebuggerStep = NoStep;
1346 m_blackboxedPositions.clear(); 1346 m_blackboxedPositions.clear();
1347 resetBlackboxedStateCache(); 1347 resetBlackboxedStateCache();
1348 m_scripts.clear(); 1348 m_scripts.clear();
1349 m_breakpointIdToDebuggerBreakpointIds.clear(); 1349 m_breakpointIdToDebuggerBreakpointIds.clear();
1350 } 1350 }
1351 1351
1352 } // namespace v8_inspector 1352 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « src/debug/debug.cc ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698