Debian Codegraph @

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

raw
1 g = newGlobal({newCompartment: true});
2 g.parent = this;
3 g.eval("(" + function() {
4 let calledTimes = 0;
5 Debugger(parent).onExceptionUnwind = function(frame) {
6 switch (calledTimes++) {
7 case 0:
8 assertEq(frame.older.type, "global");
9 break;
10 case 1:
11 // Force toplevel to return placidly so that we can tell assertions
12 // from the throwing in the test.
13 assertEq(frame.older, null);
14 return { return: undefined };
15 default:
16 assertEq(false, true);
17 }
18 }
19 } + ")()");
20
21 var handler = {
22 get() {
23 r;
24 }
25 };
26 new(new Proxy(function() {}, handler));