|
1 // Resumption values other than |undefined| from uncaughtExceptionHook from |
|
2 // onNewGlobalObject handlers are ignored (other than cancelling further hooks). |
|
3 |
|
4 load(libdir + 'asserts.js'); |
|
5 |
|
6 var dbg = new Debugger; |
|
7 var log; |
|
8 |
|
9 dbg.onNewGlobalObject = function () { |
|
10 log += 'n'; |
|
11 throw 'party'; |
|
12 }; |
|
13 |
|
14 dbg.uncaughtExceptionHook = function (ex) { |
|
15 log += 'u'; |
|
16 assertEq(ex, 'party'); |
|
17 return { throw: 'fit' }; |
|
18 }; |
|
19 |
|
20 log = ''; |
|
21 assertEq(typeof newGlobal(), 'object'); |
|
22 assertEq(log, 'nu'); |
|
23 |
|
24 dbg.uncaughtExceptionHook = function (ex) { |
|
25 log += 'u'; |
|
26 assertEq(ex, 'party'); |
|
27 }; |
|
28 |
|
29 log = ''; |
|
30 assertEq(typeof newGlobal(), 'object'); |
|
31 assertEq(log, 'nu'); |