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

Unified Diff: src/ast/scopes.cc

Issue 2253093002: Always inherit language-mode from the outer scope, modules initialize language-mode later (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Nuke comment Created 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.cc
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
index 030f9f13bb1a9a2d029067cc6288d0ef9184cf9e..eee3081c7577326c459a8b40ca7fca356faad718 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -89,9 +89,7 @@ Scope::Scope(Zone* zone, Scope* outer_scope, ScopeType scope_type)
DCHECK_EQ(SCRIPT_SCOPE, scope_type);
} else {
asm_function_ = outer_scope_->asm_module_;
- // Inherit the language mode from the parent scope unless we're a module
- // scope.
- if (!is_module_scope()) language_mode_ = outer_scope->language_mode_;
+ language_mode_ = outer_scope->language_mode_;
force_context_allocation_ =
!is_function_scope() && outer_scope->has_forced_context_allocation();
outer_scope_->AddInnerScope(this);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698