Commit 3a9668ab authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[parser] Remove invalid DCHECK, we can hit a stack overflow

Even though we know we're simply parsing a string as statement, we can still
hit a stack overflow on the way there.

Bug: v8:8392
Change-Id: I2471cf8273789aa33239f5c137cc2f54454acb32
Reviewed-on: https://chromium-review.googlesource.com/c/1307429Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57146}
parent a1d7dc40
......@@ -4642,7 +4642,6 @@ ParserBase<Impl>::ParseStatementList(StatementListT body,
RaiseLanguageMode(LanguageMode::kSloppy);
}
StatementT stat = ParseStatementListItem();
DCHECK(!has_error());
body->Add(stat, zone());
may_abort = false;
}
......@@ -4656,7 +4655,6 @@ ParserBase<Impl>::ParseStatementList(StatementListT body,
if (may_abort) {
while (peek() == Token::IDENTIFIER) {
StatementT stat = ParseStatementListItem();
RETURN_IF_PARSE_ERROR_CUSTOM(Return, kLazyParsingComplete);
// If we're allowed to abort, we will do so when we see a "long and
// trivial" function. Our current definition of "long and trivial" is:
// - over kLazyParseTrialLimit statements
......
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