blob: 0b943d900eec404775b71034b218f89f1c18ccdb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// Error handling if parsing a resumption value throws.
var g = newGlobal({newCompartment: true});
var dbg = Debugger(g);
var rv;
dbg.onDebuggerStatement = stack => rv;
dbg.uncaughtExceptionHook = function (exc) {
assertEq(exc, "BANG");
return {return: "recovered"};
};
rv = {get throw() { throw "BANG"; }};
assertEq(g.eval("debugger; false;"), "recovered");
rv = new Proxy({}, {has() { throw "BANG"; }});
assertEq(g.eval("debugger; false;"), "recovered");
|