| Index: test/mjsunit/debug-step-end-of-script.js
|
| diff --git a/test/mjsunit/regress/regress-4309-2.js b/test/mjsunit/debug-step-end-of-script.js
|
| similarity index 59%
|
| copy from test/mjsunit/regress/regress-4309-2.js
|
| copy to test/mjsunit/debug-step-end-of-script.js
|
| index 984b0071c135fd5037d252128d290d7bcc8669cc..5152353cfa9f853b621f3bb51cfb5f5f9726f7b3 100644
|
| --- a/test/mjsunit/regress/regress-4309-2.js
|
| +++ b/test/mjsunit/debug-step-end-of-script.js
|
| @@ -5,30 +5,17 @@
|
| // Flags: --expose-debug-as debug --allow-natives-syntax
|
|
|
| var Debug = debug.Debug;
|
| -
|
| -var exception = null;
|
| +var expected = ["debugger;", "", "debugger;"];
|
|
|
| function listener(event, exec_state, event_data, data) {
|
| if (event != Debug.DebugEvent.Break) return;
|
| try {
|
| - var scope = exec_state.frame().scope(0);
|
| - assertEquals(5, scope.scopeObject().property("i").value().value());
|
| + assertEquals(expected.shift(), exec_state.frame(0).sourceLineText());
|
| + exec_state.prepareStep(Debug.StepAction.StepNext, 1);
|
| } catch (e) {
|
| - exception = e;
|
| + %AbortJS(e + "\n" + e.stack);
|
| }
|
| }
|
|
|
| -function f() {
|
| - eval('var i = 5');
|
| - debugger;
|
| -}
|
| -
|
| -f();
|
| -f();
|
| -
|
| -%OptimizeFunctionOnNextCall(f);
|
| Debug.setListener(listener);
|
| -
|
| -f();
|
| -
|
| -assertNull(exception);
|
| +debugger;
|
|
|