| Index: src/debug.cc
|
| diff --git a/src/debug.cc b/src/debug.cc
|
| index 99256ba21a88a8510978e5578ab0c4f541982b0a..5dfc88d62a4a255b2b80ab7a1ac5cc9ca17e891a 100644
|
| --- a/src/debug.cc
|
| +++ b/src/debug.cc
|
| @@ -989,18 +989,17 @@ Object* Debug::Break(Arguments args) {
|
| it.Advance();
|
| }
|
|
|
| - // If we found original frame
|
| - if (it.frame()->fp() == thread_local_.last_fp_) {
|
| - if (step_count > 1) {
|
| - // Save old count and action to continue stepping after
|
| - // StepOut
|
| - thread_local_.queued_step_count_ = step_count - 1;
|
| - }
|
| -
|
| - // Set up for StepOut to reach target frame
|
| - step_action = StepOut;
|
| - step_count = count;
|
| + // Check that we indeed found the frame we are looking for.
|
| + CHECK(!it.done() && (it.frame()->fp() == thread_local_.last_fp_));
|
| + if (step_count > 1) {
|
| + // Save old count and action to continue stepping after
|
| + // StepOut
|
| + thread_local_.queued_step_count_ = step_count - 1;
|
| }
|
| +
|
| + // Set up for StepOut to reach target frame
|
| + step_action = StepOut;
|
| + step_count = count;
|
| }
|
|
|
| // Clear all current stepping setup.
|
|
|