diff options
Diffstat (limited to 'js/src/jit-test/tests/debug/Frame-environment-05.js')
-rw-r--r-- | js/src/jit-test/tests/debug/Frame-environment-05.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/debug/Frame-environment-05.js b/js/src/jit-test/tests/debug/Frame-environment-05.js new file mode 100644 index 0000000000..e39140b438 --- /dev/null +++ b/js/src/jit-test/tests/debug/Frame-environment-05.js @@ -0,0 +1,9 @@ +// Test that Debugger.Frame.prototype.environment works at all pcs of a script +// with an aliased block scope. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); +dbg.onDebuggerStatement = function (frame) { + frame.onStep = (function () { frame.environment; }); +}; +g.eval("debugger; for (let i of [1,2,3]) print(i);"); |