1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/debug/uncaughtExceptionHook-02.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,12 @@ 1.4 +// Returning a bad resumption value causes an exception that is reported to the 1.5 +// uncaughtExceptionHook. 1.6 + 1.7 +var g = newGlobal(); 1.8 +var dbg = new Debugger(g); 1.9 +dbg.onDebuggerStatement = function () { return {oops: "bad resumption value"}; }; 1.10 +dbg.uncaughtExceptionHook = function (exc) { 1.11 + assertEq(exc instanceof TypeError, true); 1.12 + return {return: "pass"}; 1.13 +}; 1.14 + 1.15 +assertEq(g.eval("debugger"), "pass");