blob: 5a5cadc1d97bf59a28a7343023c21cea3137699f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// |jit-test| error: Error
function asyncGC(...targets) {
var finalizationRegistry = new FinalizationRegistry(() => {});
for (let target of targets) {
finalizationRegistry.register(target, 'target');
}
return Promise.resolve('tick').then(() => asyncGCDeref()).then(() => {
finalizationRegistry.cleanupSome(name => { names.push(name); });
});
}
const root = newGlobal({newCompartment: true});
const dbg = new Debugger();
dbg.each = asyncGC;
const wrappedRoot = dbg.each (root)
gczeal(14,10);
evaluate(`
var StructType = class {};
`);
|