tor-browser

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

oom-in-save-stack-02.js (534B)


      1 // |jit-test| --no-ion; --no-baseline; --no-blinterp
      2 // This shouldn't assert (bug 1516514).
      3 //
      4 // Disabled for ion and baseline because those introduce OOMs at some point that
      5 // we don't seem to be able to catch, and they're not relevant to the bug.
      6 
      7 let g = newGlobal();
      8 
      9 function oomTest() {
     10  let done = false;
     11  for (let j = 1; !done; j++) {
     12    saveStack();
     13 
     14    oomAtAllocation(j);
     15 
     16    try {
     17      g.saveStack();
     18    } catch {}
     19 
     20    done = !resetOOMFailure();
     21 
     22    try {
     23      g.saveStack();
     24    } catch {}
     25  }
     26 }
     27 
     28 oomTest();