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

Unified Diff: src/debug/debug.cc

Issue 1525993002: [debugger] remove frame argument for prepare step. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug/debug.h ('k') | src/debug/debug.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug.cc
diff --git a/src/debug/debug.cc b/src/debug/debug.cc
index 6c88f826a26a944a19a6986e8a739504119ddfb9..094fd609c346c83029af89efcd7d06dac75883cc 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -493,7 +493,7 @@ void Debug::Break(Arguments args, JavaScriptFrame* frame) {
// Clear queue
thread_local_.queued_step_count_ = 0;
- PrepareStep(StepNext, step_count, StackFrame::NO_ID);
+ PrepareStep(StepNext, step_count);
} else {
// Notify the debug event listeners.
OnDebugBreak(break_points_hit, false);
@@ -531,7 +531,7 @@ void Debug::Break(Arguments args, JavaScriptFrame* frame) {
ClearStepping();
// Set up for the remaining steps.
- PrepareStep(step_action, step_count, StackFrame::NO_ID);
+ PrepareStep(step_action, step_count);
}
}
@@ -833,9 +833,7 @@ void Debug::PrepareStepOnThrow() {
}
-void Debug::PrepareStep(StepAction step_action,
- int step_count,
- StackFrame::Id frame_id) {
+void Debug::PrepareStep(StepAction step_action, int step_count) {
HandleScope scope(isolate_);
DCHECK(in_debug_scope());
@@ -844,15 +842,11 @@ void Debug::PrepareStep(StepAction step_action,
// any. The debug frame will only be present if execution was stopped due to
// hitting a break point. In other situations (e.g. unhandled exception) the
// debug frame is not present.
- StackFrame::Id id = break_frame_id();
- if (id == StackFrame::NO_ID) {
- // If there is no JavaScript stack don't do anything.
- return;
- }
- if (frame_id != StackFrame::NO_ID) {
- id = frame_id;
- }
- JavaScriptFrameIterator frames_it(isolate_, id);
+ StackFrame::Id frame_id = break_frame_id();
+ // If there is no JavaScript stack don't do anything.
+ if (frame_id == StackFrame::NO_ID) return;
+
+ JavaScriptFrameIterator frames_it(isolate_, frame_id);
JavaScriptFrame* frame = frames_it.frame();
feature_tracker()->Track(DebugFeatureTracker::kStepping);
« no previous file with comments | « src/debug/debug.h ('k') | src/debug/debug.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698