Index: test/mjsunit/wasm/wasm-module-builder.js |
diff --git a/test/mjsunit/wasm/wasm-module-builder.js b/test/mjsunit/wasm/wasm-module-builder.js |
index bfc4460d91b899d4ca640502cbfd625ef35ea1b4..992aef243709532b33e8bb23c555892c4f0b78ef 100644 |
--- a/test/mjsunit/wasm/wasm-module-builder.js |
+++ b/test/mjsunit/wasm/wasm-module-builder.js |
@@ -342,11 +342,8 @@ WasmModuleBuilder.prototype.toBuffer = function(debug) { |
return buffer; |
} |
-WasmModuleBuilder.prototype.instantiate = function(ffi, memory) { |
- var buffer = this.toBuffer(); |
- if (memory != undefined) { |
- return Wasm.instantiateModule(buffer, ffi, memory); |
- } else { |
- return Wasm.instantiateModule(buffer, ffi); |
- } |
+WasmModuleBuilder.prototype.instantiate = function(...args) { |
+ var module = new WebAssembly.Module(this.toBuffer()); |
+ var instance = new WebAssembly.Instance(module, ...args); |
+ return instance; |
} |