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

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

Issue 2626313003: [wasm] Change the constant kV8MaxWasmMemoryPages to a command line flag. (Closed)
Patch Set: typo 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
Index: src/wasm/module-decoder.cc
diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc
index d7c7954de2e5d700121aad968d676e193d21d163..c5c39a1cd97b305c82b77bca88859e8ba72d5a59 100644
--- a/src/wasm/module-decoder.cc
+++ b/src/wasm/module-decoder.cc
@@ -320,10 +320,11 @@ class ModuleDecoder : public Decoder {
case kExternalMemory: {
// ===== Imported memory =========================================
bool has_max = false;
- consume_resizable_limits("memory", "pages", kV8MaxWasmMemoryPages,
- &module->min_mem_pages, &has_max,
- kSpecMaxWasmMemoryPages,
- &module->max_mem_pages);
+ consume_resizable_limits(
+ "memory", "pages",
+ static_cast<uint32_t>(FLAG_wasm_max_mem_pages),
+ &module->min_mem_pages, &has_max, kSpecMaxWasmMemoryPages,
+ &module->max_mem_pages);
SetHasMemory(module);
break;
}
@@ -396,8 +397,9 @@ class ModuleDecoder : public Decoder {
for (uint32_t i = 0; ok() && i < memory_count; i++) {
bool has_max = false;
consume_resizable_limits(
- "memory", "pages", kV8MaxWasmMemoryPages, &module->min_mem_pages,
- &has_max, kSpecMaxWasmMemoryPages, &module->max_mem_pages);
+ "memory", "pages", static_cast<uint32_t>(FLAG_wasm_max_mem_pages),
+ &module->min_mem_pages, &has_max, kSpecMaxWasmMemoryPages,
+ &module->max_mem_pages);
}
SetHasMemory(module);
section_iter.advance();

Powered by Google App Engine
This is Rietveld 408576698