| Index: test/mjsunit/regress/regress-crbug-605581.js
|
| diff --git a/test/mjsunit/debug-evaluate-modify-this.js b/test/mjsunit/regress/regress-crbug-605581.js
|
| similarity index 60%
|
| copy from test/mjsunit/debug-evaluate-modify-this.js
|
| copy to test/mjsunit/regress/regress-crbug-605581.js
|
| index 930f6ed0431078cd02d6253bdedb1dd4f76560b1..0f1daabead95a6357503f418c5b46c710ba6b99b 100644
|
| --- a/test/mjsunit/debug-evaluate-modify-this.js
|
| +++ b/test/mjsunit/regress/regress-crbug-605581.js
|
| @@ -4,30 +4,25 @@
|
|
|
| // Flags: --expose-debug-as debug
|
|
|
| -Debug = debug.Debug
|
| -
|
| +var Debug = debug.Debug;
|
| var exception = null;
|
|
|
| -var f = () => { debugger; }
|
| -var g = function() { debugger; }
|
| -var h = (function() { return () => { debugger; }; }).call({});
|
| -
|
| function listener(event, exec_state, event_data, data) {
|
| if (event != Debug.DebugEvent.Break) return;
|
| try {
|
| - assertThrows(() => exec_state.frame(0).evaluate("this = 2"));
|
| + assertThrows(() => exec_state.frame(0).evaluate("bar.baz"), ReferenceError);
|
| } catch (e) {
|
| exception = e;
|
| - print("Caught something. " + e + " " + e.stack);
|
| - };
|
| -};
|
| + }
|
| +}
|
|
|
| Debug.setListener(listener);
|
|
|
| -f();
|
| -g();
|
| -g.call({});
|
| -h();
|
| +(function() {
|
| + debugger; // bar is still in TDZ at this point.
|
| + let bar = 1;
|
| + (x => bar); // force bar to be context-allocated.
|
| +})();
|
|
|
| Debug.setListener(null);
|
| assertNull(exception);
|
|
|