| Index: src/wasm/module-decoder.cc
|
| diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc
|
| index b3e0928d1c8082327cb042d37a0993c5fe1f4a6c..af3a3f666a45dd0dc5423b5aa2783c9c819eaa14 100644
|
| --- a/src/wasm/module-decoder.cc
|
| +++ b/src/wasm/module-decoder.cc
|
| @@ -540,7 +540,8 @@ class ModuleDecoder : public Decoder {
|
| table = &module->function_tables[table_index];
|
| }
|
| WasmInitExpr offset = consume_init_expr(module, kAstI32);
|
| - uint32_t num_elem = consume_u32v("number of elements");
|
| + uint32_t num_elem =
|
| + consume_count("number of elements", kV8MaxWasmTableEntries);
|
| std::vector<uint32_t> vector;
|
| module->table_inits.push_back({table_index, offset, vector});
|
| WasmTableInit* init = &module->table_inits.back();
|
| @@ -550,7 +551,6 @@ class ModuleDecoder : public Decoder {
|
| init->entries.push_back(index);
|
| if (table && index < module->functions.size()) {
|
| // Canonicalize signature indices during decoding.
|
| - // TODO(titzer): suboptimal, redundant when verifying only.
|
| table->map.FindOrInsert(module->functions[index].sig);
|
| }
|
| }
|
|
|