tor-browser

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

cross-global.js (372B)


      1 const Module = WebAssembly.Module;
      2 
      3 // Create cross-compartment wrappers to typed arrays and array buffers.
      4 var g = newGlobal();
      5 var code1 = g.eval("wasmTextToBinary('(module)')");
      6 var code2 = g.eval("wasmTextToBinary('(module)').buffer");
      7 
      8 // Should get unwrapped.
      9 assertEq(new Module(code1) instanceof Module, true);
     10 assertEq(new Module(code2) instanceof Module, true);