summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Frame-environment-03.js
blob: 3676389e8071223114087b1c22ca4795ea6a55d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
// If !frame.live, frame.environment throws.

load(libdir + "asserts.js");

var g = newGlobal();
var dbg = Debugger(g);
var frame;
g.h = function () { frame = dbg.getNewestFrame(); };
g.eval("h();");
assertEq(frame.live, false);
assertThrowsInstanceOf(function () { frame.environment; }, Error);