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

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. 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 | « 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
This is Rietveld 408576698