michael@0: // Resumption values other than |undefined| from uncaughtExceptionHook from michael@0: // onNewGlobalObject handlers are ignored (other than cancelling further hooks). michael@0: michael@0: load(libdir + 'asserts.js'); michael@0: michael@0: var dbg = new Debugger; michael@0: var log; michael@0: michael@0: dbg.onNewGlobalObject = function () { michael@0: log += 'n'; michael@0: throw 'party'; michael@0: }; michael@0: michael@0: dbg.uncaughtExceptionHook = function (ex) { michael@0: log += 'u'; michael@0: assertEq(ex, 'party'); michael@0: return { throw: 'fit' }; michael@0: }; michael@0: michael@0: log = ''; michael@0: assertEq(typeof newGlobal(), 'object'); michael@0: assertEq(log, 'nu'); michael@0: michael@0: dbg.uncaughtExceptionHook = function (ex) { michael@0: log += 'u'; michael@0: assertEq(ex, 'party'); michael@0: }; michael@0: michael@0: log = ''; michael@0: assertEq(typeof newGlobal(), 'object'); michael@0: assertEq(log, 'nu');