Commit fc100f8e authored by Marja Hölttä's avatar Marja Hölttä Committed by Commit Bot

[parser] If we re-parse after preparsing, reset stack overflow too

The bug was that PreParser detected a stack overflow and an unidentifiable
error, and we tried to re-parse the same code. However, the stack overflow flag
was still set, and that messed up error handling in the Parser.

BUG=chromium:899495

Change-Id: Icdef74bdb8be252d75f245e243e1303ffb822ce2
Reviewed-on: https://chromium-review.googlesource.com/c/1304316Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57082}
parent b16fdb77
...@@ -66,6 +66,7 @@ class PendingCompilationErrorHandler { ...@@ -66,6 +66,7 @@ class PendingCompilationErrorHandler {
void clear_unidentifiable_error() { void clear_unidentifiable_error() {
has_pending_error_ = false; has_pending_error_ = false;
unidentifiable_error_ = false; unidentifiable_error_ = false;
stack_overflow_ = false;
} }
bool has_error_unidentifiable_by_preparser() const { bool has_error_unidentifiable_by_preparser() const {
return unidentifiable_error_; return unidentifiable_error_;
......
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