[parser] Set all tokens to ILLEGAL on parser error
Otherwise already peeked tokens will possibly pass later checks causing us to parse more than necessary. Initially we held off on doing this since subsequent Consume calls would fail after previous checks succeeded; especially in the case of stack overflow. However, we've previously relaxed that DCHECK to also pass if the parser has an error. Change-Id: I413dffd475982d07299a08270fa94fdc3858e883 Reviewed-on: https://chromium-review.googlesource.com/c/1304313Reviewed-by: Marja Hölttä <marja@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#57054}
Showing
Please
register
or
sign in
to comment