Commit 04a7123a authored by mvstanton's avatar mvstanton Committed by Commit bot

Bugfix: CCTest test-func-name-inference/InConstructor is broken

BUG=v8:4331
LOG=N

Review URL: https://codereview.chromium.org/1263763002

Cr-Commit-Position: refs/heads/master@{#29927}
parent 3c9e8de5
......@@ -2199,6 +2199,11 @@ Statement* Parser::ParseFunctionDeclaration(
bool is_strict_reserved = false;
const AstRawString* name = ParseIdentifierOrStrictReservedWord(
&is_strict_reserved, CHECK_OK);
if (fni_ != NULL) {
fni_->Enter();
fni_->PushEnclosingName(name);
}
FunctionLiteral* fun = ParseFunctionLiteral(
name, scanner()->location(),
is_strict_reserved ? kFunctionNameIsStrictReserved
......@@ -2207,6 +2212,8 @@ Statement* Parser::ParseFunctionDeclaration(
: FunctionKind::kNormalFunction,
pos, FunctionLiteral::DECLARATION, FunctionLiteral::NORMAL_ARITY,
language_mode(), CHECK_OK);
if (fni_ != NULL) fni_->Leave();
// Even if we're not at the top-level of the global or a function
// scope, we treat it as such and introduce the function with its
// initial value upon entering the corresponding scope.
......
......@@ -71,10 +71,6 @@
# This tests API threading, no point in running several variants.
'test-api/Threading*': [PASS, NO_VARIANTS],
# Parser fixes break the function name inference in the constructor.
# BUG(4331)
'test-func-name-inference/InConstructor': [SKIP],
# The cpu profiler tests are notoriously flaky.
# BUG(2999). (test/cpu-profiler/CollectCpuProfile)
# BUG(3287). (test-cpu-profiler/SampleWhenFrameIsNotSetup)
......
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