Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(744)

Unified Diff: src/parsing/parser.h

Issue 1657783002: Gracefully handle syntax errors in Parser::PatternRewriter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Unit test. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/parsing/pattern-rewriter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index c37953f04ad3c24480d8f57303e2ade4340ae02c..dbce26b09ec9746a63f1e405f00603a731deadb9 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -832,6 +832,8 @@ class Parser : public ParserBase<ParserTraits> {
void set_context(PatternContext context) { context_ = context; }
void RecurseIntoSubpattern(AstNode* pattern, Expression* value) {
+ if (!*ok_) return;
+
Expression* old_value = current_value_;
current_value_ = value;
recursion_level_++;
« no previous file with comments | « no previous file | src/parsing/pattern-rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698