summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/bug1375447.js
blob: 5801a150ed8cf5e9d75a64f56c3df72c4c9594ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
var g = newGlobal({newCompartment: true});
var dbg = new Debugger;
var gw = dbg.addDebuggee(g);
g.eval(`
var line0 = Error().lineNumber;
function f() {
    try {
  throw 4;
    } catch(e) {}
}
`);
var script = gw.getOwnPropertyDescriptor("f").value.script;
var handler = {
    hit: function() {}
};
var offs = script.getLineOffsets(g.line0 + 4);
for (var i = 0; i < offs.length; i++) script.setBreakpoint(offs[i], handler);
assertEq(g.f(), undefined);