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

Unified Diff: src/parsing/preparser.h

Issue 1488043002: [parser] treat MethodDefinitions in ObjectPatterns as SyntaxErrors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixups Created 5 years 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/cctest/test-parsing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.h
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
index e93f3f998dc27687069e47412b6db94f8de4c46c..d35c439619b2e8722728a1950a2c11315a9af10d 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -2737,6 +2737,8 @@ ParserBase<Traits>::ParsePropertyDefinition(
return this->EmptyObjectLiteralProperty();
}
+ BindingPatternUnexpectedToken(classifier);
+
if (is_generator || peek() == Token::LPAREN) {
// MethodDefinition
// PropertyName '(' StrictFormalParameters ')' '{' FunctionBody '}'
« no previous file with comments | « no previous file | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698