Debian Codegraph @

js/src/jit-test/tests/debug/prologueFailure-01.js

raw
1 g = newGlobal({newCompartment: true});
2 g.parent = this;
3
4 function installHook() {
5 let calledTimes = 0;
6 function hook() {
7 calledTimes++;
8
9 // Allow the new.target.prototype get to throw.
10 if (calledTimes === 1)
11 return undefined;
12
13 return {
14 return: undefined
15 };
16 }
17
18 Debugger(parent).onExceptionUnwind = hook;
19 }
20
21
22 g.eval("(" + installHook + ")()");
23
24 var handler = {
25 get(t, p) {
26 throw new TypeError;
27 }
28 };
29
30
31 var f = new Proxy(function(){}, handler);
32 new f();