Index: src/ast/scopes.h |
diff --git a/src/ast/scopes.h b/src/ast/scopes.h |
index fa289733066386d5635780a9359cdbd13a714302..6013f0c9a9f30830211be582281807867644ac7a 100644 |
--- a/src/ast/scopes.h |
+++ b/src/ast/scopes.h |
@@ -207,14 +207,11 @@ class V8_EXPORT_PRIVATE Scope : public NON_EXPORTED_BASE(ZoneObject) { |
// Scope-specific info. |
// Inform the scope and outer scopes that the corresponding code contains an |
- // eval call. We don't record eval calls from innner scopes in the outer most |
- // script scope, as we only see those when parsing eagerly. If we recorded the |
- // calls then, the outer most script scope would look different depending on |
- // whether we parsed eagerly or not which is undesirable. |
+ // eval call. |
void RecordEvalCall() { |
scope_calls_eval_ = true; |
inner_scope_calls_eval_ = true; |
- for (Scope* scope = outer_scope(); scope && !scope->is_script_scope(); |
+ for (Scope* scope = outer_scope(); scope != nullptr; |
scope = scope->outer_scope()) { |
scope->inner_scope_calls_eval_ = true; |
} |