summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-02.js
blob: 0e2750b0cd7fd7b1644e7d09ee554a6021fe5b87 (plain)
1
2
3
4
5
6
7
8
9
10
// Check that if an onExceptionUnwind hook forces a constructor frame to
// return a primitive value, it still gets wrapped up in an object.

var g = newGlobal();
var dbg = Debugger(g);
dbg.onExceptionUnwind = function (frame, exc) {
    return { return:"sproon" };
};
g.eval("function f() { throw 'ksnife'; }");
assertEq(typeof new g.f, "object");