Debian Codegraph @

js/src/jit-test/tests/gc/bug-1600238.js

raw
1 gczeal(0);
2 newGlobal();
3 nukeAllCCWs();
4 function f() {
5 global = newGlobal({
6 newCompartment: true
7 });
8 try {
9 return global.eval("new FinalizationRegistry(function(){})");
10 } catch (e) {
11 if (e instanceof TypeError && e.message.includes('dead')) {
12 // Creating a new CCW to the global fails with
13 // --more-compartments option.
14 quit();
15 }
16 throw e;
17 }
18 }
19 r = f();
20 r.register({}, {}, {});
21 startgc();