michael@0: // Returning a bad resumption value causes an exception that is reported to the michael@0: // uncaughtExceptionHook. michael@0: michael@0: var g = newGlobal(); michael@0: var dbg = new Debugger(g); michael@0: dbg.onDebuggerStatement = function () { return {oops: "bad resumption value"}; }; michael@0: dbg.uncaughtExceptionHook = function (exc) { michael@0: assertEq(exc instanceof TypeError, true); michael@0: return {return: "pass"}; michael@0: }; michael@0: michael@0: assertEq(g.eval("debugger"), "pass");