Index: src/wasm/wasm-interpreter.cc |
diff --git a/src/wasm/wasm-interpreter.cc b/src/wasm/wasm-interpreter.cc |
index aabf4105634f0de9723c6f5b88810eb4e3855c6b..49ed755e4868e62ab9f2342a4df51a4f3ef72135 100644 |
--- a/src/wasm/wasm-interpreter.cc |
+++ b/src/wasm/wasm-interpreter.cc |
@@ -1397,13 +1397,10 @@ class ThreadImpl : public WasmInterpreter::Thread { |
size_t index = stack_.size() - operand.arity - 1; |
DCHECK_LT(index, stack_.size()); |
uint32_t entry_index = stack_[index].to<uint32_t>(); |
- // Assume only one table for now. |
- DCHECK_LE(module()->function_tables.size(), 1u); |
- InterpreterCode* target = codemap()->GetIndirectCode(0, entry_index); |
+ InterpreterCode* target = |
+ codemap()->GetIndirectCode(operand.table_index, entry_index); |
if (target == nullptr) { |
return DoTrap(kTrapFuncInvalid, pc); |
- } else if (target->function->sig_index != operand.index) { |
- return DoTrap(kTrapFuncSigMismatch, pc); |
} |
DoCall(target, &pc, pc + 1 + operand.length, &limit); |