Commit 1937d900 authored by jochen's avatar jochen Committed by Commit bot

Fully setup the catch variable for catch scopes

If the parser creates a catch scope, the variable is also added to
ordered_variables_ so just always do that.

Otherwise, it's not possible to create a ScopeInfo for that catch scope

R=verwaest@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2278963002
Cr-Commit-Position: refs/heads/master@{#38921}
parent 5558a508
......@@ -195,9 +195,8 @@ Scope::Scope(Zone* zone, const AstRawString* catch_variable_name)
#ifdef DEBUG
already_resolved_ = true;
#endif
Variable* variable =
variables_.Declare(zone, this, catch_variable_name, VAR, Variable::NORMAL,
kCreatedInitialized);
Variable* variable = Declare(zone, this, catch_variable_name, VAR,
Variable::NORMAL, kCreatedInitialized);
AllocateHeapSlot(variable);
}
......
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