Index: test/mjsunit/debug-stepin-call-function-stub.js |
diff --git a/test/mjsunit/debug-stepin-call-function-stub.js b/test/mjsunit/debug-stepin-call-function-stub.js |
index 053b8bfe8a993aa8f0b23e1252343d4c95a01c65..b3e385bfb5dace219f0f41ba9b0567088691c8c9 100644 |
--- a/test/mjsunit/debug-stepin-call-function-stub.js |
+++ b/test/mjsunit/debug-stepin-call-function-stub.js |
@@ -42,11 +42,11 @@ var step_in_count = 2; |
function listener(event, exec_state, event_data, data) { |
try { |
if (event == Debug.DebugEvent.Break) { |
- if (state == 0) { |
+ if (state < step_in_count) { |
// Step into f(). |
- exec_state.prepareStep(Debug.StepAction.StepIn, step_in_count); |
- state = 2; |
- } else if (state == 2) { |
+ exec_state.prepareStep(Debug.StepAction.StepIn); |
+ state++; |
+ } else { |
assertEquals(expected_source_line_text, |
event_data.sourceLineText()); |
assertEquals(expected_function_name, event_data.func().name()); |