blob: 98b3a4011c2e9affb5affe2596e68c6128c0341d (
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();
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");
|