Index: test/mjsunit/wasm/compiled-module-serialization.js |
diff --git a/test/mjsunit/wasm/compiled-module-serialization.js b/test/mjsunit/wasm/compiled-module-serialization.js |
index 96ebd8ab6359be6627dffd234b49b93fdbde610a..b5c25e0a0186b1014b710f9e7a16553dceb4cd60 100644 |
--- a/test/mjsunit/wasm/compiled-module-serialization.js |
+++ b/test/mjsunit/wasm/compiled-module-serialization.js |
@@ -35,12 +35,12 @@ load("test/mjsunit/wasm/wasm-module-builder.js"); |
kExprCallFunction, 1]); |
builder.appendToTable([2, 3]); |
- |
- var module = new WebAssembly.Module(builder.toBuffer()); |
+ var wire_bytes = builder.toBuffer(); |
+ var module = new WebAssembly.Module(wire_bytes); |
var buff = %SerializeWasmModule(module); |
module = null; |
gc(); |
- module = %DeserializeWasmModule(buff); |
+ module = %DeserializeWasmModule(buff, wire_bytes); |
var mem_1 = new ArrayBuffer(4); |
var view_1 = new Int32Array(mem_1); |
@@ -59,7 +59,7 @@ load("test/mjsunit/wasm/wasm-module-builder.js"); |
(function DeserializeInvalidObject() { |
var invalid_buffer = new ArrayBuffer(10); |
- module = %DeserializeWasmModule(invalid_buffer); |
+ module = %DeserializeWasmModule(invalid_buffer, invalid_buffer); |
assertEquals(module, undefined); |
})(); |
@@ -69,9 +69,10 @@ load("test/mjsunit/wasm/wasm-module-builder.js"); |
.addBody([kExprI8Const, 42]) |
.exportFunc(); |
- var compiled_module = new WebAssembly.Module(builder.toBuffer()); |
+ var wire_bytes = builder.toBuffer(); |
+ var compiled_module = new WebAssembly.Module(wire_bytes); |
var serialized = %SerializeWasmModule(compiled_module); |
- var clone = %DeserializeWasmModule(serialized); |
+ var clone = %DeserializeWasmModule(serialized, wire_bytes); |
assertNotNull(clone); |
assertFalse(clone == undefined); |
@@ -85,11 +86,12 @@ load("test/mjsunit/wasm/wasm-module-builder.js"); |
.addBody([kExprI8Const, 42]) |
.exportFunc(); |
- var compiled_module = new WebAssembly.Module(builder.toBuffer()); |
+ var wire_bytes = builder.toBuffer() |
+ var compiled_module = new WebAssembly.Module(wire_bytes); |
var instance1 = new WebAssembly.Instance(compiled_module); |
var instance2 = new WebAssembly.Instance(compiled_module); |
var serialized = %SerializeWasmModule(compiled_module); |
- var clone = %DeserializeWasmModule(serialized); |
+ var clone = %DeserializeWasmModule(serialized, wire_bytes); |
assertNotNull(clone); |
assertFalse(clone == undefined); |