summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/resumption-01.js
blob: 7fc9857ac757e3c97bf7fd774e0946f8d29b0599 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Simple {throw:} resumption.

load(libdir + "asserts.js");

var g = newGlobal({newCompartment: true});
var dbg = Debugger(g);
dbg.onDebuggerStatement = function (stack) { return {throw: "oops"}; };

assertThrowsValue(function () { g.eval("debugger;"); }, "oops");

g.eval("function f() { debugger; }");
assertThrowsValue(function () { g.f(); }, "oops");