js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-11.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:dc31f6b1dc44
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');

mercurial