Index: src/parser.cc |
=================================================================== |
--- src/parser.cc (revision 6540) |
+++ src/parser.cc (working copy) |
@@ -3257,6 +3257,7 @@ |
ZoneList<ObjectLiteral::Property*>* properties = |
new ZoneList<ObjectLiteral::Property*>(4); |
int number_of_boilerplate_properties = 0; |
+ bool has_function = false; |
ObjectLiteralPropertyChecker checker(this, temp_scope_->StrictMode()); |
@@ -3344,6 +3345,8 @@ |
ObjectLiteral::Property* property = |
new ObjectLiteral::Property(key, value); |
+ if (value->AsFunctionLiteral() != NULL) has_function = true; |
+ |
// Count CONSTANT or COMPUTED properties to maintain the enumeration order. |
if (IsBoilerplateProperty(property)) number_of_boilerplate_properties++; |
// Validate the property |
@@ -3379,7 +3382,8 @@ |
literal_index, |
is_simple, |
fast_elements, |
- depth); |
+ depth, |
+ has_function); |
} |