summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Environment-object-01.js
blob: 3ef1702a0c250a0973ac942a00769635cbfdb4a9 (plain)
1
2
3
4
5
6
7
8
var g = newGlobal();
var dbg = new Debugger(g);

dbg.onDebuggerStatement = (frame) => {
  assertEq(frame.environment.parent.type, "object");
  assertEq(frame.environment.parent.object.getOwnPropertyDescriptor("x").value, 42);
}
g.evalReturningScope("x = 42; debugger;");