tor-browser

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

debug-noprofiling.js (900B)


      1 // |jit-test| exitstatus: 6; skip-if: !wasmDebuggingEnabled()
      2 
      3 // Don't include wasm.js in timeout tests: when wasm isn't supported, it will
      4 // quit(0) which will cause the test to fail.
      5 
      6 newGlobal({newCompartment: true}).Debugger().addDebuggee(this);
      7 
      8 var t = new WebAssembly.Table({
      9    initial: 1,
     10    element: "anyfunc"
     11 });
     12 
     13 new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(`
     14 (module
     15    (import "imports" "t" (table 1 funcref))
     16    (func $iloop loop $top br $top end)
     17    (elem (i32.const 0) $iloop))
     18 `)), { imports: { t } });
     19 
     20 outer = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(`
     21 (module
     22    (import "imports" "t" (table 1 funcref))
     23    (type $v2v (func))
     24    (func (export "run")
     25        i32.const 0
     26        call_indirect (type $v2v))
     27    )`)), { imports: { t } });
     28 
     29 setJitCompilerOption('simulator.always-interrupt', 1);
     30 timeout(1);
     31 outer.exports.run();