tor-browser

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

stringification-crash.html (722B)


      1 <!DOCTYPE html>
      2 <html class="test-wait">
      3 <script id="workerScript" type="text/worker">
      4  // Blob will pass a huge Uint8Array object whose stringification will take long
      5  const encoder = new TextEncoderStream()
      6  const blob = new Blob([new ArrayBuffer(1338720)])
      7  const writable = new WritableStream()
      8  blob.stream().pipeThrough(encoder).pipeTo(writable)
      9  // Wait a bit for the piping to start
     10  Promise.resolve().then(() => postMessage('started'));
     11 </script>
     12 <script>
     13  const worker = new Worker(URL.createObjectURL(new Blob([
     14    document.getElementById("workerScript").textContent
     15  ])))
     16  worker.onmessage = () => {
     17    worker.terminate();
     18    document.documentElement.classList.remove("test-wait");
     19  };
     20 </script>