Debian Codegraph @

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

raw
1 // |jit-test| error: TypeError
2
3 let g = newGlobal();
4 let dbg = Debugger(g);
5
6 let forceException = g.eval(`
7 (class extends class {} {
8 // Calling this will return a primitive on return.
9 constructor() { return {}; }
10 })
11 `);
12
13 dbg.onEnterFrame = function(f) {
14 f.onPop = function() {
15 return {
16 // Force the return of an illegal value.
17 return: 1
18 }
19 }
20 }
21
22 new forceException;