tor-browser

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

test-error-worklet.mjs (517B)


      1 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
      2 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
      3 /* Any copyright is dedicated to the Public Domain.
      4 * http://creativecommons.org/publicdomain/zero/1.0/ */
      5 
      6 function throw_process() {
      7  throw "process"; // eslint-disable-line no-throw-literal
      8 }
      9 
     10 class ErrorProcessor extends AudioWorkletProcessor {
     11  process() {
     12    throw_process();
     13  }
     14 }
     15 registerProcessor("error", ErrorProcessor);
     16 
     17 function throw_error() {
     18  throw new Error("addModule");
     19 }
     20 
     21 throw_error();