blob: 07b705d540be95ff8a184ac6e05093954be8cbde (
plain)
1
2
3
4
5
6
7
8
9
10
|
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);
|