Skip to content

Commit

Permalink
Migrate FinalizationRegistry tests to per-item callback API
Browse files Browse the repository at this point in the history
  • Loading branch information
syg authored and rwaldron committed Apr 1, 2020
1 parent 4199a3b commit 966fc11
Show file tree
Hide file tree
Showing 19 changed files with 49 additions and 986 deletions.
4 changes: 2 additions & 2 deletions harness/async-gc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ function asyncGC(...targets) {
targets = null;

return Promise.resolve('tick').then(() => asyncGCDeref()).then(() => {
var names;
var names = [];

// consume iterator to capture names
finalizationRegistry.cleanupSome(iter => { names = [...iter]; });
finalizationRegistry.cleanupSome(name => { names.push(name); });

if (!names || names.length != length) {
throw asyncGC.notCollected;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 966fc11

Please sign in to comment.