Index: src/ast/scopes.cc |
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc |
index ad9330538ab9260b8e586d65d24976e88ec4e749..e783fb1f8273d91d1bb0fde4e4c358f066d2b99f 100644 |
--- a/src/ast/scopes.cc |
+++ b/src/ast/scopes.cc |
@@ -354,17 +354,20 @@ Scope* Scope::DeserializeScopeChain(Isolate* isolate, Zone* zone, |
} |
DCHECK(!scope_info->HasOuterScopeInfo()); |
break; |
- } else if (scope_info->scope_type() == FUNCTION_SCOPE || |
- scope_info->scope_type() == EVAL_SCOPE) { |
- // TODO(neis): For an eval scope, we currently create an ordinary function |
- // context. This is wrong and needs to be fixed. |
- // https://bugs.chromium.org/p/v8/issues/detail?id=5295 |
+ } else if (scope_info->scope_type() == FUNCTION_SCOPE) { |
outer_scope = |
new (zone) DeclarationScope(zone, FUNCTION_SCOPE, handle(scope_info)); |
if (scope_info->IsAsmFunction()) |
outer_scope->AsDeclarationScope()->set_asm_function(); |
if (scope_info->IsAsmModule()) |
outer_scope->AsDeclarationScope()->set_asm_module(); |
+ } else if (scope_info->scope_type() == EVAL_SCOPE) { |
+ if (scope_info->is_declaration_scope()) { |
+ outer_scope = |
adamk
2016/11/12 00:26:05
Can you add a DCHECK here that scope_info->languag
Dan Ehrenberg
2016/12/07 05:41:26
Actually, deleted this code, as it wasn't doing an
|
+ new (zone) DeclarationScope(zone, EVAL_SCOPE, handle(scope_info)); |
+ } else { |
+ outer_scope = new (zone) Scope(zone, EVAL_SCOPE, handle(scope_info)); |
+ } |
} else if (scope_info->scope_type() == BLOCK_SCOPE) { |
if (scope_info->is_declaration_scope()) { |
outer_scope = |