Commit c5e4df37 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

Remove a redundant condition in LookupIterator

It's implied by the last clause of the conjunction.

Change-Id: I78a810a259888eda696c77cd6c117b35ef9e861a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1549171Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60627}
parent 3e71841f
......@@ -218,7 +218,7 @@ Handle<JSReceiver> LookupIterator::GetRootForNonJSReceiver(
Isolate* isolate, Handle<Object> receiver, uint32_t index) {
// Strings are the only objects with properties (only elements) directly on
// the wrapper. Hence we can skip generating the wrapper for all other cases.
if (index != kMaxUInt32 && receiver->IsString() &&
if (receiver->IsString() &&
index < static_cast<uint32_t>(String::cast(*receiver)->length())) {
// TODO(verwaest): Speed this up. Perhaps use a cached wrapper on the native
// context, ensuring that we don't leak it into JS?
......
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