diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/debug/onExceptionUnwind-10.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-10.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,16 @@ +// Ensure that ScriptDebugEpilogue gets called when onExceptionUnwind +// terminates execution. +var g = newGlobal(); +var dbg = Debugger(g); +var frame; +dbg.onExceptionUnwind = function (f, x) { + frame = f; + assertEq(frame.type, 'eval'); + assertEq(frame.live, true); + terminate(); +}; +dbg.onDebuggerStatement = function(f) { + assertEq(f.eval('throw 42'), null); + assertEq(frame.live, false); +}; +g.eval('debugger');