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

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

Issue 2648223004: [wasm] Change the constant kV8MaxWasmTableSize to a command line flag. (Closed)
Patch Set: 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 d3c08bde527028a6c9ac5a742d0571b05aae2d98..d8f630ea28386b6e9c7325da39dd3f24ec353fc3 100644
--- a/src/wasm/module-decoder.cc
+++ b/src/wasm/module-decoder.cc
@@ -313,8 +313,8 @@ class ModuleDecoder : public Decoder {
expect_u8("element type", kWasmAnyFunctionTypeForm);
WasmIndirectFunctionTable* table = &module->function_tables.back();
consume_resizable_limits("element count", "elements",
- kV8MaxWasmTableSize, &table->min_size,
- &table->has_max, kV8MaxWasmTableSize,
+ FLAG_wasm_max_table_size, &table->min_size,
+ &table->has_max, FLAG_wasm_max_table_size,
&table->max_size);
break;
}
@@ -381,9 +381,10 @@ class ModuleDecoder : public Decoder {
false, false, SignatureMap()});
WasmIndirectFunctionTable* table = &module->function_tables.back();
expect_u8("table type", kWasmAnyFunctionTypeForm);
- consume_resizable_limits(
- "table elements", "elements", kV8MaxWasmTableSize, &table->min_size,
- &table->has_max, kV8MaxWasmTableSize, &table->max_size);
+ consume_resizable_limits("table elements", "elements",
+ FLAG_wasm_max_table_size, &table->min_size,
+ &table->has_max, FLAG_wasm_max_table_size,
+ &table->max_size);
}
section_iter.advance();
}
@@ -526,7 +527,7 @@ class ModuleDecoder : public Decoder {
// ===== Elements section ================================================
if (section_iter.section_code() == kElementSectionCode) {
uint32_t element_count =
- consume_count("element count", kV8MaxWasmTableSize);
+ consume_count("element count", FLAG_wasm_max_table_size);
for (uint32_t i = 0; ok() && i < element_count; ++i) {
const byte* pos = pc();
uint32_t table_index = consume_u32v("table index");

Powered by Google App Engine
This is Rietveld 408576698