tor-browser

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

bug-1905256.js (661B)


      1 // |jit-test| skip-if: !hasFunction["gczeal"]
      2 
      3 gczeal(0);
      4 gc();
      5 
      6 let key = {};
      7 let value = {}
      8 let wm = new WeakMap();
      9 wm.set(key, value);
     10 grayRoot()[0] = wm;
     11 addMarkObservers([key, wm, value])
     12 wm = undefined;
     13 value = undefined;
     14 
     15 // Enable incremental marking verification.
     16 gczeal(11);
     17 
     18 // Yield after root marking.
     19 gczeal(8);
     20 
     21 // Start an incremental collection.
     22 startgc(1);
     23 assertEq(gcstate(), "Mark");
     24 
     25 // Clear key reference, marking it via the prebarrier.
     26 key = undefined;
     27 
     28 // Verify incremental marking and finish the collection incrementally.
     29 while (gcstate() !== "NotActive") {
     30  gcslice(1);
     31 }
     32 gczeal(0);
     33 
     34 assertEq(getMarks().join(), "black,gray,gray");