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

Unified Diff: src/parsing/parser-base.h

Issue 2084703005: Fix bug with illegal spread as single arrow parameter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | test/mjsunit/harmony/regress/regress-crbug-621496.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index dc08f5c5803923dd9ee29bf92228af10d5f0efe3..9b1a2dcabda5748fa0d7da3fcee22de15f83b857 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -1592,8 +1592,11 @@ ParserBase<Traits>::ParsePrimaryExpression(ExpressionClassifier* classifier,
MessageTemplate::kUnexpectedToken,
Token::String(Token::ELLIPSIS));
classifier->RecordNonSimpleParameter();
- ExpressionT expr =
- this->ParseAssignmentExpression(true, classifier, CHECK_OK);
+ ExpressionClassifier binding_classifier(this);
+ ExpressionT expr = this->ParseAssignmentExpression(
+ true, &binding_classifier, CHECK_OK);
+ classifier->Accumulate(&binding_classifier,
+ ExpressionClassifier::AllProductions);
nickie 2016/06/22 09:35:55 This is now identical to the code handling spreads
if (!this->IsIdentifier(expr) && !IsValidPattern(expr)) {
classifier->RecordArrowFormalParametersError(
Scanner::Location(ellipsis_pos, scanner()->location().end_pos),
« no previous file with comments | « no previous file | test/mjsunit/harmony/regress/regress-crbug-621496.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698