Chromium Code Reviews| Index: src/wasm/ast-decoder.h |
| diff --git a/src/wasm/ast-decoder.h b/src/wasm/ast-decoder.h |
| index 001dfb4c5c292713c6744d9448aac366ac76926c..74e05841dd57649ba3ba9b710874ef4d4b73ca55 100644 |
| --- a/src/wasm/ast-decoder.h |
| +++ b/src/wasm/ast-decoder.h |
| @@ -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_; } |
|
titzer
2016/10/13 13:46:10
Does this obviate the previous fix?
ahaas
2016/10/13 13:53:44
This change does not prevent any crashes, it just
|
| uint32_t next() { |
| DCHECK(has_next()); |
| index_++; |