michael@0: // |jit-test| debug michael@0: // null resumption value means terminate the debuggee michael@0: michael@0: var g = newGlobal(); michael@0: g.debuggeeGlobal = this; michael@0: g.eval("(" + function () { michael@0: var dbg = new Debugger(debuggeeGlobal); michael@0: dbg.onDebuggerStatement = function (frame) { michael@0: if (frame.callee === null) { michael@0: // The first debugger statement below. michael@0: debuggeeGlobal.log += "1"; michael@0: var cv = frame.eval("f();"); michael@0: assertEq(cv, null); michael@0: debuggeeGlobal.log += "2"; michael@0: } else { michael@0: // The second debugger statement. michael@0: debuggeeGlobal.log += "3"; michael@0: assertEq(frame.callee.name, "f"); michael@0: return null; michael@0: } michael@0: }; michael@0: } + ")()"); michael@0: michael@0: var log = ""; michael@0: debugger; michael@0: michael@0: function f() { michael@0: log += "4"; michael@0: try { michael@0: debugger; // the debugger terminates us here michael@0: } finally { michael@0: log += "5"; // this should not execute michael@0: } michael@0: } michael@0: michael@0: assertEq(log, "1432");