summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/class-07.js
blob: a6a69cb79ff2730f57c26059183075f2ee281802 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// |jit-test| error: ReferenceError

let g = newGlobal({newCompartment: true});
let dbg = Debugger(g);

let forceException = g.eval(`
    (class extends class {} {
        // Calling this will return a primitive immediately.
        constructor() { return {}; }
    })
`);

dbg.onEnterFrame = function() {
    return {
        // Force the return undefined, which will throw for returning
        // while |this| is still undefined.
        return: undefined
    }
}
print("break here");
new forceException;