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