1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-10.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,16 @@ 1.4 +// Ensure that ScriptDebugEpilogue gets called when onExceptionUnwind 1.5 +// terminates execution. 1.6 +var g = newGlobal(); 1.7 +var dbg = Debugger(g); 1.8 +var frame; 1.9 +dbg.onExceptionUnwind = function (f, x) { 1.10 + frame = f; 1.11 + assertEq(frame.type, 'eval'); 1.12 + assertEq(frame.live, true); 1.13 + terminate(); 1.14 +}; 1.15 +dbg.onDebuggerStatement = function(f) { 1.16 + assertEq(f.eval('throw 42'), null); 1.17 + assertEq(frame.live, false); 1.18 +}; 1.19 +g.eval('debugger');