JSObject* holder,
uint32_t key,
BackingStore* backing_store) {
- MaybeObject* element =
- ElementsAccessorSubclass::GetImpl(receiver, holder, key, backing_store);
- return !element->IsTheHole();
+ return ElementsAccessorSubclass::GetAttributesImpl(
+ receiver, holder, key, backing_store) != ABSENT;
}
virtual bool HasElement(Object* receiver,
PropertyAttributes JSReceiver::GetElementAttribute(uint32_t index) {
- return GetElementAttributeWithReceiver(this, index, true);
+ if (IsJSProxy()) {
+ return JSProxy::cast(this)->GetElementAttributeWithHandler(this, index);
+ }
+ return JSObject::cast(this)->GetElementAttributeWithReceiver(
+ this, index, true);
}
if (IsJSProxy()) {
return JSProxy::cast(this)->HasElementWithHandler(index);
}
- return JSObject::cast(this)->GetElementAttribute(index) != ABSENT;
+ return JSObject::cast(this)->GetElementAttributeWithReceiver(
+ this, index, true) != ABSENT;
}
if (IsJSProxy()) {
return JSProxy::cast(this)->HasElementWithHandler(index);
}
- return JSObject::cast(this)->GetLocalElementAttribute(index) != ABSENT;
-}
-
-
-PropertyAttributes JSReceiver::GetElementAttributeWithReceiver(
- JSReceiver* receiver, uint32_t index, bool continue_search) {
- if (IsJSProxy()) {
- return JSProxy::cast(this)->GetElementAttributeWithHandler(receiver, index);
- }
return JSObject::cast(this)->GetElementAttributeWithReceiver(
- receiver, index, continue_search);
+ this, index, false) != ABSENT;
}
Object* proto = GetPrototype();
if (proto->IsNull()) return ABSENT;
ASSERT(proto->IsJSGlobalObject());
- return JSReceiver::cast(proto)->GetElementAttributeWithReceiver(
+ return JSObject::cast(proto)->GetElementAttributeWithReceiver(
receiver, index, continue_search);
}
PropertyAttributes GetLocalPropertyAttribute(String* name);
inline PropertyAttributes GetElementAttribute(uint32_t index);
- inline PropertyAttributes GetElementAttributeWithReceiver(
- JSReceiver* receiver,
- uint32_t index,
- bool continue_search);
inline PropertyAttributes GetLocalElementAttribute(uint32_t index);
// Can cause a GC.