tor-browser

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

bigint-div-by-zero-not-bigintptr.js (401B)


      1 // Fallible BigInt division should have a resume point and its alias set
      2 // should record that exceptions can be thrown.
      3 function resumeAfterException(t) {
      4  for (var i = 0; i < 2; i++) {
      5    try {
      6      var x = 1;
      7      1_0000_0000_0000_0000n / 1n;
      8      x = 2;
      9      1_0000_0000_0000_0000n / t;
     10    } catch (e) {
     11      assertEq(x, 2);
     12    }
     13  }
     14 }
     15 resumeAfterException(1n);
     16 resumeAfterException(0n);