michael@0: // If frame.onStep returns null, debuggee catch and finally blocks are skipped. michael@0: michael@0: var g = newGlobal(); michael@0: g.eval("function h() { debugger; }"); michael@0: michael@0: var dbg = Debugger(g); michael@0: var hits = 0; michael@0: dbg.onDebuggerStatement = function (frame) { michael@0: hits++; michael@0: if (hits == 1) { michael@0: var rv = frame.eval("try {\n" + michael@0: " h();\n" + michael@0: " throw 'fail';\n" + michael@0: "} catch (exc) {\n" + michael@0: " caught = exc;\n" + michael@0: "} finally {\n" + michael@0: " finallyHit = true;\n" + michael@0: "}\n"); michael@0: assertEq(rv, null); michael@0: } else { michael@0: frame.older.onStep = function () { michael@0: this.onStep = undefined; michael@0: return null; michael@0: }; michael@0: } michael@0: }; michael@0: michael@0: g.h(); michael@0: assertEq(hits, 2); michael@0: assertEq("caught" in g, false); michael@0: assertEq("finallyHit" in g, false);