michael@0: // Ensure that ScriptDebugEpilogue gets called when onExceptionUnwind michael@0: // terminates execution. michael@0: var g = newGlobal(); michael@0: var dbg = Debugger(g); michael@0: var frame; michael@0: dbg.onExceptionUnwind = function (f, x) { michael@0: frame = f; michael@0: assertEq(frame.type, 'eval'); michael@0: assertEq(frame.live, true); michael@0: terminate(); michael@0: }; michael@0: dbg.onDebuggerStatement = function(f) { michael@0: assertEq(f.eval('throw 42'), null); michael@0: assertEq(frame.live, false); michael@0: }; michael@0: g.eval('debugger');