diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/debug/onExceptionUnwind-08.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-08.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,18 @@ +// Ensure that ScriptDebugEpilogue gets called when onExceptionUnwind +// throws an uncaught exception. +var g = newGlobal(); +var dbg = Debugger(g); +var frame; +dbg.onExceptionUnwind = function (f, x) { + frame = f; + assertEq(frame.live, true); + throw 'unhandled'; +}; +dbg.onDebuggerStatement = function(f) { + assertEq(f.eval('throw 42'), null); + assertEq(frame.live, false); +}; +g.eval('debugger'); + +// Don't fail just because we reported an uncaught exception. +quit(0);