Debian Codegraph @

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

raw
1 // |jit-test| error: ReferenceError
2
3 let g = newGlobal({newCompartment: true});
4 let dbg = Debugger(g);
5
6 let forceException = g.eval(`
7 (class extends class {} {
8 // Calling this will return a primitive immediately.
9 constructor() { return {}; }
10 })
11 `);
12
13 dbg.onEnterFrame = function() {
14 return {
15 // Force the return undefined, which will throw for returning
16 // while |this| is still undefined.
17 return: undefined
18 }
19 }
20 print("break here");
21 new forceException;