tor-browser

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

bug-1568119.js (485B)


      1 function allocateSomeStuff() {
      2  return {a: "a fish", b: [1, 2, 3]};
      3 }
      4 
      5 oomTest(() => {
      6  // Run a minor GC with a small nursery.
      7  gcparam('minNurseryBytes', 256 * 1024);
      8  gcparam('maxNurseryBytes', 256 * 1024);
      9  allocateSomeStuff();
     10  minorgc();
     11 
     12  // Run a minor GC with a larger nursery to get it to attempt to grow and
     13  // fail the allocation there.
     14  gcparam('maxNurseryBytes', 1024 * 1024);
     15  gcparam('minNurseryBytes', 1024 * 1024);
     16  allocateSomeStuff();
     17  minorgc();
     18 });