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

Unified Diff: src/parsing/parser.cc

Issue 2423053002: Install the 'name' property in classes at runtime (Closed)
Patch Set: Check for 'name' properties at parse-time Created 4 years, 1 month 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
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 18da7615f4557f94c76f35bd43f7e05c684a0985..72b515ea89ce1ef605737b97cf03643db49d54ad 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -3510,6 +3510,7 @@ void Parser::DeclareClassProperty(const AstRawString* class_name,
// - static_initializer_var
// - instance_field_initializers
// - properties
+// - has_name_static_property
Expression* Parser::RewriteClassLiteral(const AstRawString* name,
ClassInfo* class_info, int pos,
bool* ok) {
@@ -3544,7 +3545,8 @@ Expression* Parser::RewriteClassLiteral(const AstRawString* name,
ClassLiteral* class_literal = factory()->NewClassLiteral(
class_info->proxy, class_info->extends, class_info->constructor,
- class_info->properties, pos, end_pos);
+ class_info->properties, pos, end_pos,
+ class_info->has_name_static_property);
if (class_info->static_initializer_var != nullptr) {
class_literal->set_static_initializer_proxy(

Powered by Google App Engine
This is Rietveld 408576698