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

let g = newGlobal();
let dbg = Debugger(g);

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

dbg.onEnterFrame = function(f) {
    f.onPop = function() {
        return {
            // Force the return of an illegal value.
            return: 1
        }
    }
}

new forceException;