tor-browser

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

bug1891422.js (796B)


      1 // |jit-test| --more-compartments; skip-variant-if: --setpref=wasm_test_serialization=true, true; skip-variant-if: --wasm-compiler=ion, true
      2 
      3 a = newGlobal({ newCompartment: true });
      4 a.b = this;
      5 a.eval(`Debugger(b).onExceptionUnwind = function () {};`);
      6 
      7 var ins0 = wasmEvalText(`(module
      8  (func $fac-acc (export "e") (param i64 i64)
      9    unreachable
     10  )
     11 )`);
     12 var ins = wasmEvalText(`(module
     13  (import "" "e" (func $fac-acc (param i64 i64)))
     14  (type $tz (func (param i64)))
     15  (table $t 1 1 funcref)
     16  (func $f (export "fac") (param i64)
     17    local.get 0
     18    i32.const 0
     19    return_call_indirect $t (type $tz)
     20  )
     21  (elem $t (i32.const 0) $fac-acc)
     22 )`, {"": {e: ins0.exports.e}});
     23 
     24 
     25 assertErrorMessage(() => {
     26  ins.exports.fac(5n);
     27 }, WebAssembly.RuntimeError, /indirect call signature mismatch/);