Debian Codegraph @

js/src/jit-test/tests/debug/class-08.js

raw
1 let g = newGlobal({newCompartment: true});
2 let dbg = Debugger(g);
3 dbg.onDebuggerStatement = function() {
4 // Force the constructor to return undefined, which should be replaced with
5 // |this| if the latter has been initialized.
6 return { return: undefined };
7 }
8
9 assertEq(g.eval(`
10 new (class extends class {} {
11 constructor() { super(); this.foo = 42; debugger; }
12 })
13 `).foo, 42);