1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/debug/uncaughtExceptionHook-resumption-03.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,12 @@ 1.4 +// After an onExceptionUnwind hook throws, if uncaughtExceptionHook returns 1.5 +// undefined, the original exception continues to propagate. 1.6 + 1.7 +var g = newGlobal(); 1.8 +var dbg = new Debugger(g); 1.9 +var log = ''; 1.10 +dbg.onExceptionUnwind = function () { log += "1"; throw new Error("oops"); }; 1.11 +dbg.uncaughtExceptionHook = function () { log += "2"; }; 1.12 + 1.13 +g.eval("var x = new Error('oops');"); 1.14 +g.eval("try { throw x; } catch (exc) { assertEq(exc, x); }"); 1.15 +assertEq(log, "12");