Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(847)

Unified Diff: test/mjsunit/wasm/instantiate-module-basic.js

Issue 2633153002: [wasm] Catch attempt to export non-existent memory (Closed)
Patch Set: Added TODO Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/module-decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+})();
« no previous file with comments | « src/wasm/module-decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698