Index: src/lookup-inl.h |
diff --git a/src/lookup-inl.h b/src/lookup-inl.h |
index a801e3493e54124c2bc211daa7c2afe0f4b2747f..f48096fb3827dabf1d354e1c1db7dcedb1959fd3 100644 |
--- a/src/lookup-inl.h |
+++ b/src/lookup-inl.h |
@@ -42,22 +42,29 @@ LookupIterator::State LookupIterator::LookupInHolder(Map* const map, |
case NOT_FOUND: |
if (map->IsJSProxyMap()) return JSPROXY; |
if (map->is_access_check_needed() && |
- !isolate_->IsInternallyUsedPropertyName(name_)) { |
+ (IsElement() || !isolate_->IsInternallyUsedPropertyName(name_))) { |
return ACCESS_CHECK; |
} |
// Fall through. |
case ACCESS_CHECK: |
- if (exotic_index_state_ != ExoticIndexState::kNoIndex && |
+ if (exotic_index_state_ != ExoticIndexState::kNotExotic && |
IsIntegerIndexedExotic(holder)) { |
return INTEGER_INDEXED_EXOTIC; |
} |
- if (check_interceptor() && map->has_named_interceptor() && |
+ if (check_interceptor() && HasInterceptor(map) && |
!SkipInterceptor(JSObject::cast(holder))) { |
return INTERCEPTOR; |
} |
// Fall through. |
case INTERCEPTOR: |
- if (map->is_dictionary_map()) { |
+ if (IsElement()) { |
+ JSObject* js_object = JSObject::cast(holder); |
+ ElementsAccessor* accessor = js_object->GetElementsAccessor(); |
+ FixedArrayBase* backing_store = js_object->elements(); |
+ number_ = accessor->GetIndexForKey(backing_store, index_); |
+ if (number_ == kMaxUInt32) return NOT_FOUND; |
+ property_details_ = accessor->GetDetails(backing_store, number_); |
+ } else if (map->is_dictionary_map()) { |
NameDictionary* dict = JSObject::cast(holder)->property_dictionary(); |
number_ = dict->FindEntry(name_); |
if (number_ == NameDictionary::kNotFound) return NOT_FOUND; |
@@ -97,7 +104,7 @@ LookupIterator::State LookupIterator::LookupNonMaskingInterceptorInHolder( |
Map* const map, JSReceiver* const holder) { |
switch (state_) { |
case NOT_FOUND: |
- if (check_interceptor() && map->has_named_interceptor() && |
+ if (check_interceptor() && HasInterceptor(map) && |
!SkipInterceptor(JSObject::cast(holder))) { |
return INTERCEPTOR; |
} |