tor-browser

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

bigint-mod-by-zero.js (304B)


      1 // Fallible BigInt modulus should bail out on division by zero.
      2 function resumeAfterException(t) {
      3  for (var i = 0; i < 2; i++) {
      4    try {
      5      var x = 1;
      6      1n % 1n;
      7      x = 2;
      8      1n % t;
      9    } catch (e) {
     10      assertEq(x, 2);
     11    }
     12  }
     13 }
     14 resumeAfterException(1n);
     15 resumeAfterException(0n);