tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

finalizationRegistry-gray.js (323B)


      1 // Test gray finalization registry is correctly barrired.
      2 target = {};
      3 registry = new FinalizationRegistry(value => undefined);
      4 registry.register(target, 1);
      5 grayRoot()[0] = registry;
      6 registry = undefined;
      7 gc(); // Registry is now marked gray.
      8 target = undefined;
      9 gc(); // Target dies, registry is queued.
     10 drainJobQueue();