summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/prologueFailure-01.js
blob: 1702eeb92d4270e8c26b87433dae6682eda12c77 (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
32
g = newGlobal();
g.parent = this;

function installHook() {
    let calledTimes = 0;
    function hook() {
        calledTimes++;

        // Allow the new.target.prototype get to throw.
        if (calledTimes === 1)
            return undefined;

        return {
            return: undefined
        };
    }

    Debugger(parent).onExceptionUnwind = hook;
}


g.eval("(" + installHook + ")()");

var handler = {
    get(t, p) {
        throw new TypeError;
    }
};


var f = new Proxy(function(){}, handler);
new f();