tor-browser

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

bug1782468-ptrdiff-veclen.js (463B)


      1 // |jit-test| skip-if: getBuildConfiguration("android")
      2 
      3 try {
      4  a = {};
      5  for (b = 0; b < 24; b++)
      6    a += a;
      7  Function(a, a, a);
      8  assertEq(true, false, "allocation overflow expected");
      9 } catch (e) {
     10  if (getBuildConfiguration("pointer-byte-size") == 4) {
     11    const msg = e + "";
     12    assertEq(msg.includes("out of memory") || msg.includes("InternalError: allocation size overflow"), true);
     13  } // else on 64-bit, it will be a SyntaxError for invalid code.
     14 }