Index: src/parser.h |
diff --git a/src/parser.h b/src/parser.h |
index c815a4546257ef74b0ae3bb2b94778b3c0abc648..1650cba52123278ef9a61affa38e4890ce57ea89 100644 |
--- a/src/parser.h |
+++ b/src/parser.h |
@@ -427,7 +427,7 @@ class ParserTraits { |
static void CheckFunctionLiteralInsideTopLevelObjectLiteral( |
Scope* scope, ObjectLiteralProperty* property, bool* has_function) { |
Expression* value = property->value(); |
- if (scope->DeclarationScope()->is_global_scope() && |
+ if (scope->DeclarationScope()->is_script_scope() && |
value->AsFunctionLiteral() != NULL) { |
*has_function = true; |
value->AsFunctionLiteral()->set_pretenure(); |