summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/class-08.js
blob: 000f9ae67c0a40195b582e2d104d1bf0749275ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
let g = newGlobal({newCompartment: true});
let dbg = Debugger(g);
dbg.onDebuggerStatement = function() {
    // Force the constructor to return undefined, which should be replaced with
    // |this| if the latter has been initialized.
    return { return: undefined };
}

assertEq(g.eval(`
    new (class extends class {} {
        constructor() { super(); this.foo = 42; debugger; }
    })
`).foo, 42);