Chromium Code Reviews

Unified Diff: src/wasm/module-decoder.cc

Issue 2624853002: [wasm] JS API tests for `WebAssembly.validate` (Closed)
Patch Set: addressed feedback Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | src/wasm/wasm-module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/module-decoder.cc
diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc
index 506c7355ab62fca4a9bea16aa0d62a6621b46034..8f92c6e34cf28de44777fd1961df40c08d16f9fb 100644
--- a/src/wasm/module-decoder.cc
+++ b/src/wasm/module-decoder.cc
@@ -324,7 +324,11 @@ class ModuleDecoder : public Decoder {
&module->min_mem_pages, &has_max,
kSpecMaxWasmMemoryPages,
&module->max_mem_pages);
- module->has_memory = true;
+ if (module->has_memory) {
+ error("At most one memory object is supported");
+ } else {
+ module->has_memory = true;
+ }
break;
}
case kExternalGlobal: {
« no previous file with comments | « no previous file | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine