Index: test/mjsunit/wasm/instantiate-module-basic.js |
diff --git a/test/mjsunit/wasm/instantiate-module-basic.js b/test/mjsunit/wasm/instantiate-module-basic.js |
index db9917aa77d483815e4995a8aa07f9478aa92fb7..a01f27276d9b57de4a71c473881c28e9a1d51033 100644 |
--- a/test/mjsunit/wasm/instantiate-module-basic.js |
+++ b/test/mjsunit/wasm/instantiate-module-basic.js |
@@ -241,3 +241,9 @@ assertFalse(WebAssembly.validate(bytes(88, 88, 88, 88, 88, 88, 88, 88))); |
assertThrows(() => new WebAssembly.Instance(module, {"":{memory:memory}}), WebAssembly.LinkError); |
})(); |
+ |
+(function TestNoMemoryToExport() { |
+ let builder = new WasmModuleBuilder(); |
+ builder.exportMemoryAs('memory'); |
+ assertThrows(() => builder.instantiate(), WebAssembly.CompileError); |
+})(); |