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

load(libdir + "asserts.js");

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