blob: 852160b03c5fa6b9582a82132acb7fa319fe5755 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// If frame.onStep returns {throw:}, an exception is thrown in the debuggee.
load(libdir + "asserts.js");
var g = newGlobal({newCompartment: true});
g.eval("function h() { debugger; }\n" +
"function f() {\n" +
" h();\n" +
" return 'fail';\n" +
"}\n");
var dbg = Debugger(g);
dbg.onDebuggerStatement = function (frame) {
frame.older.onStep = function () { return {throw: "pass"}; };
};
assertThrowsValue(g.f, "pass");
|