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

var g = newGlobal({newCompartment: true});
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()");