summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Frame-environment-01.js
blob: 1168732e2934f0c4bc95d8478d12a498c62ea2cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// frame.environment is a Debugger.Environment object

var g = newGlobal({newCompartment: true})
var dbg = Debugger(g);
g.h = function () {
    assertEq(dbg.getNewestFrame().environment instanceof Debugger.Environment, true);
};

g.eval("h()");
g.evaluate("h()");
g.eval("eval('h()')");
g.eval("function f() { h(); }");
g.f();