michael@0: // |jit-test| debug; error: ReferenceError michael@0: // If uncaughtExceptionHook is absent, the debuggee is terminated. michael@0: michael@0: var g = newGlobal(); michael@0: g.debuggeeGlobal = this; michael@0: g.eval("(" + function () { michael@0: var dbg = Debugger(debuggeeGlobal); michael@0: dbg.onDebuggerStatement = function (frame) { michael@0: if (frame.callee === null) { michael@0: debuggeeGlobal.log += '1'; michael@0: var cv = frame.eval("f();"); michael@0: debuggeeGlobal.log += '2'; michael@0: assertEq(cv, null); michael@0: } else { michael@0: assertEq(frame.callee.name, "f"); michael@0: debuggeeGlobal.log += '3'; michael@0: throw new ReferenceError("oops"); michael@0: } michael@0: }; michael@0: } + ")();"); michael@0: michael@0: function onerror(msg) { michael@0: } michael@0: michael@0: var log = ''; michael@0: debugger; michael@0: function f() { michael@0: try { michael@0: debugger; michael@0: } finally { michael@0: log += 'x'; michael@0: } michael@0: } michael@0: assertEq(log, '132');