Commit fbef7e14 authored by verwaest's avatar verwaest Committed by Commit bot

Take the scope info of the direct outer scope as outer scope info

BUG=v8:5209

Review-Url: https://codereview.chromium.org/2424693003
Cr-Commit-Position: refs/heads/master@{#40356}
parent f8654ce9
......@@ -1087,11 +1087,8 @@ void DeclarationScope::AllocateVariables(ParseInfo* info, AnalyzeMode mode) {
AllocateVariablesRecursively();
MaybeHandle<ScopeInfo> outer_scope;
for (const Scope* s = outer_scope_; s != nullptr; s = s->outer_scope_) {
if (s->scope_info_.is_null()) continue;
outer_scope = s->scope_info_;
break;
}
if (outer_scope_ != nullptr) outer_scope = outer_scope_->scope_info_;
AllocateScopeInfosRecursively(info->isolate(), outer_scope);
if (mode == AnalyzeMode::kDebugger) {
AllocateDebuggerScopeInfos(info->isolate(), outer_scope);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment