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

Unified Diff: src/parser.cc

Issue 1303033003: Fix function scoping issue (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix tests Created 5 years, 4 months 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/mjsunit/regress/regress-520029.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index a7a31e7173593e67036cf4ffb9de14bb79f2e478..9ccfb1f1f81f32e5143fc5e4bdd91033279f897d 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -4021,7 +4021,8 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
Scope* declaration_scope = scope_->DeclarationScope();
Scope* original_declaration_scope = original_scope_->DeclarationScope();
Scope* scope = function_type == FunctionLiteral::DECLARATION &&
- is_sloppy(language_mode) && !allow_harmony_sloppy() &&
+ is_sloppy(language_mode) &&
+ !allow_harmony_sloppy_function() &&
(original_scope_ == original_declaration_scope ||
declaration_scope != original_declaration_scope)
? NewScope(declaration_scope, FUNCTION_SCOPE, kind)
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-520029.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698