Debian Codegraph @

js/src/jit-test/tests/debug/bug-1584195.js

raw
1 // Bug 1584195: Debugger.Frame finalizer should't try to apply
2 // IsAboutToBeFinalized to cells of other alloc kinds, whose arenas may have
3 // been turned over to fresh allocations.
4
5 try {
6 evaluate(`
7 var g9 = newGlobal({newCompartment: true});
8 g9.parent = this;
9 g9.eval(\`
10 var dbg = new Debugger(parent);
11 dbg.onEnterFrame = frame => {};
12 \`);
13 function lfPromise(x) {
14 return new Promise(resolve => {});
15 }
16 async function lfAsync() {
17 await lfPromise();
18 } lfAsync();
19 `);
20 gczeal(20, 2);
21 evaluate(`
22 async function lfAsync() {} lfAsync();
23 `);
24 gczeal(12, 7);
25 drainJobQueue();
26 evaluate(`
27 new { ... v22 => {
28 `);
29 } catch (exc) {}
30 evaluate("");