summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Frame-environment-05.js
blob: e39140b438c01da8fa2c388dab0c510aa188cd18 (plain)
1
2
3
4
5
6
7
8
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);");