summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Frame-offset-01.js
blob: 69f7f3ae5a78dffe2a6acdbb6b87fa4a0583c4da (plain)
1
2
3
4
5
6
7
8
9
10
11
// frame.offset throws if !frame.onStack.

load(libdir + "asserts.js");

var g = newGlobal({newCompartment: true});
var dbg = Debugger(g);
var f;
dbg.onDebuggerStatement = function (frame) { f = frame; };
g.eval("debugger;");
assertEq(f.onStack, false);
assertThrowsInstanceOf(function () { f.offset; }, Error);