summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/onExceptionUnwind-06.js
blob: 19dd33d02a670158966625a8d443bc2b61578fad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// onExceptionUnwind assigning to argv[1] does not affect the thrown exception.

var g = newGlobal({newCompartment: true});
g.parent = this;
g.eval("function f(frame, exc) { f2 = function () { return exc; }; exc = 123; }");
g.eval("new Debugger(parent).onExceptionUnwind = f;");

var obj = new Error("oops");
try {
    throw obj;
} catch (exc) {
    assertEq(exc, obj);
}