tor-browser

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

bug1871605.js (761B)


      1 // |jit-test| --more-compartments; skip-variant-if: --setpref=wasm_test_serialization=true, true; skip-variant-if: --wasm-compiler=ion, true
      2 
      3 var dbg = newGlobal()
      4 dbg.parent = this
      5 dbg.eval(`
      6      Debugger(parent).onEnterFrame = function() {}
      7 `)
      8 
      9 var wasm = `(module
     10    (type $t1 (array (mut i32))) 
     11    (type $t2 (array (mut (ref null $t1))))
     12    (import "" "c" 
     13      (func $c
     14        (param i32 (ref $t2)) 
     15        (result (ref $t2))))
     16    (func $f (result (ref $t2))
     17      (return_call $c
     18        (i32.const 0)
     19        (array.new $t2 (ref.null $t1) (i32.const 1500)))
     20    )
     21   (func (export "test")
     22     (drop (call $f))
     23   )
     24 )`;
     25 
     26 var ins = wasmEvalText(wasm, {"": { c() {},}});
     27 assertErrorMessage(
     28  () => ins.exports.test(),
     29  TypeError, /bad type/
     30 );