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

Unified Diff: src/parser.h

Issue 716833002: Various clean-ups after top-level lexical declarations are done. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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/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();

Powered by Google App Engine
This is Rietveld 408576698