Commit 52cf416a authored by ahaas's avatar ahaas Committed by Commit bot

[wasm] Let BranchTableIterator::has_next return false if decoder->failed()

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2411793006
Cr-Commit-Position: refs/heads/master@{#40287}
parent 96a448ab
......@@ -234,7 +234,7 @@ struct BranchTableOperand {
class BranchTableIterator {
public:
unsigned cur_index() { return index_; }
bool has_next() { return index_ <= table_count_; }
bool has_next() { return decoder_->ok() && index_ <= table_count_; }
uint32_t next() {
DCHECK(has_next());
index_++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment