summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Frame-environment-02.js
blob: 6d6101c59a47b7c12a4b5b3db7a2c5e538a5aab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// dbg.getNewestFrame().environment works.

var g = newGlobal();
var dbg = new Debugger;
var gw = dbg.addDebuggee(g);
g.h = function () {
    var env = dbg.getNewestFrame().environment.parent;
    assertEq(env instanceof Debugger.Environment, true);
    assertEq(env.object, gw);
    assertEq(env.parent, null);
};
g.eval("h()");