Commit 9126cb8d authored by verwaest's avatar verwaest Committed by Commit bot

Also mark the script-scope for eager compilation upon ForceEagerCompilation

BUG=v8:5424

Review-Url: https://codereview.chromium.org/2427503002
Cr-Commit-Position: refs/heads/master@{#40338}
parent 8791f01b
......@@ -791,10 +791,12 @@ class DeclarationScope : public Scope {
// Make sure this closure and all outer closures are eagerly compiled.
void ForceEagerCompilation() {
DCHECK_EQ(this, GetClosureScope());
for (DeclarationScope* s = this; !s->is_script_scope();
DeclarationScope* s;
for (s = this; !s->is_script_scope();
s = s->outer_scope()->GetClosureScope()) {
s->force_eager_compilation_ = true;
}
s->force_eager_compilation_ = true;
}
#ifdef DEBUG
......
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