summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Object-deleteProperty-error-01.js
blob: 9115f551c69db4a8bde6dba495b84ad59baf43ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Don't crash when a scripted proxy handler throws Error.prototype.

var g = newGlobal();
var dbg = Debugger(g);
dbg.onDebuggerStatement = function (frame) {
    try {
        frame.arguments[0].deleteProperty("x");
    } catch (exc) {
        return;
    }
    throw new Error("deleteProperty should throw");
};

g.eval("function h(obj) { debugger; }");
g.eval("h(new Proxy({}, { deleteProperty() { throw Error.prototype; }}));");