Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 // Resumption values other than |undefined| from uncaughtExceptionHook from
2 // onNewGlobalObject handlers are ignored (other than cancelling further hooks).
4 load(libdir + 'asserts.js');
6 var dbg = new Debugger;
7 var log;
9 dbg.onNewGlobalObject = function () {
10 log += 'n';
11 throw 'party';
12 };
14 dbg.uncaughtExceptionHook = function (ex) {
15 log += 'u';
16 assertEq(ex, 'party');
17 return { throw: 'fit' };
18 };
20 log = '';
21 assertEq(typeof newGlobal(), 'object');
22 assertEq(log, 'nu');
24 dbg.uncaughtExceptionHook = function (ex) {
25 log += 'u';
26 assertEq(ex, 'party');
27 };
29 log = '';
30 assertEq(typeof newGlobal(), 'object');
31 assertEq(log, 'nu');