Chromium Code Reviews| Index: src/wasm/wasm-module.cc |
| diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc |
| index dc34d52d21279c6ed565ffa828d5982f0d99e236..e789982ba8b58b75f469cab1f7d1dd7d11a849d7 100644 |
| --- a/src/wasm/wasm-module.cc |
| +++ b/src/wasm/wasm-module.cc |
| @@ -1042,7 +1042,7 @@ class WasmInstanceBuilder { |
| factory->NewFixedArray(function_table_count); |
| for (int index = 0; index < function_table_count; ++index) { |
| WasmIndirectFunctionTable& table = module_->function_tables[index]; |
| - uint32_t size = table.max_size; |
| + uint32_t size = table.max_size > 0 ? table.max_size : table.size; |
|
ahaas
2016/10/20 09:09:42
Could we just set the default value of table.max_s
|
| Handle<FixedArray> new_table = factory->NewFixedArray(size * 2); |
| for (int i = 0; i < new_table->length(); ++i) { |
| static const int kInvalidSigIndex = -1; |