tor-browser

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

bug1600488-1.js (371B)


      1 const token = {};
      2 let cleanedUpValue;
      3 const finalizationRegistry = new FinalizationRegistry(value => {
      4  cleanedUpValue = value;
      5 });
      6 {
      7    let object = {};
      8    finalizationRegistry.register(object, token, token);
      9    object = undefined;
     10 }
     11 gc();
     12 finalizationRegistry.cleanupSome();
     13 assertEq(cleanedUpValue, token);
     14 assertEq(finalizationRegistry.unregister(token), false);