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