| Index: test/mjsunit/debug-evaluate-modify-catch-block-scope.js
|
| diff --git a/test/mjsunit/regress/regress-crbug-119800.js b/test/mjsunit/debug-evaluate-modify-catch-block-scope.js
|
| similarity index 52%
|
| copy from test/mjsunit/regress/regress-crbug-119800.js
|
| copy to test/mjsunit/debug-evaluate-modify-catch-block-scope.js
|
| index 1641cac686ef8c56699ff5140b805f6e9b1abf07..63e30b7cf0e5e23d3f9047c68dcc32e361ccf2f9 100644
|
| --- a/test/mjsunit/regress/regress-crbug-119800.js
|
| +++ b/test/mjsunit/debug-evaluate-modify-catch-block-scope.js
|
| @@ -4,34 +4,36 @@
|
|
|
| // Flags: --expose-debug-as debug
|
|
|
| -function f() {
|
| - 1;
|
| - 2;
|
| - 3;
|
| -}
|
| +Debug = debug.Debug
|
|
|
| -var Debug = debug.Debug;
|
| var exception = null;
|
| -var breaks = [];
|
| -
|
| function listener(event, exec_state, event_data, data) {
|
| if (event != Debug.DebugEvent.Break) return;
|
| try {
|
| - Debug.debuggerFlags().breakPointsActive.setValue(false);
|
| - breaks.push(exec_state.frame().sourceLineText().trimLeft());
|
| - exec_state.prepareStep(Debug.StepAction.StepIn, 1);
|
| + exec_state.frame(0).evaluate("bar()");
|
| } catch (e) {
|
| exception = e;
|
| + print(e + e.stack);
|
| }
|
| }
|
|
|
| Debug.setListener(listener);
|
| -Debug.setBreakPoint(f, 0, 0);
|
|
|
| -f();
|
| +(function() {
|
| + "use strict";
|
| + try {
|
| + throw 1;
|
| + } catch (e) {
|
| + let a = 1;
|
| + function bar() {
|
| + a = 2; // this has no effect, when called from debug-eval
|
| + e = 2; // this has no effect, when called from debug-eval.
|
| + }
|
| + debugger;
|
| + assertEquals(1, a);
|
| + assertEquals(1, e);
|
| + }
|
| +})();
|
|
|
| Debug.setListener(null);
|
| -Debug.debuggerFlags().breakPointsActive.setValue(true);
|
| -
|
| assertNull(exception);
|
| -assertEquals(breaks, ["1;", "2;", "3;", "}", "Debug.setListener(null);"]);
|
|
|