blob: d11945cc5c048371dcfaf49828813cef1d1e6585 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// frame.offset gives different values at different points in a script.
var g = newGlobal({newCompartment: true});
var dbg = Debugger(g);
var s = undefined, a = []
dbg.onDebuggerStatement = function (frame) {
if (s === undefined)
s = frame.script;
else
assertEq(s, frame.script);
assertEq(frame.offset !== undefined, true);
assertEq(a.indexOf(frame.offset), -1);
a.push(frame.offset);
};
g.eval("debugger; debugger; debugger;");
assertEq(a.length, 3);
|