Commit f528509b authored by Peter Marshall's avatar Peter Marshall Committed by Commit Bot

[cleanup] Don't cast ScopeInfo twice in inferred_name()

Change-Id: Id34b9dbe07871fc8e25bcb73d908b5b155a9f4e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1571407
Auto-Submit: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60905}
parent c2835df6
......@@ -710,7 +710,7 @@ String SharedFunctionInfo::inferred_name() {
if (maybe_scope_info->IsScopeInfo()) {
ScopeInfo scope_info = ScopeInfo::cast(maybe_scope_info);
if (scope_info->HasInferredFunctionName()) {
Object name = ScopeInfo::cast(maybe_scope_info)->InferredFunctionName();
Object name = scope_info->InferredFunctionName();
if (name->IsString()) return String::cast(name);
}
} else if (HasUncompiledData()) {
......
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