| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index 62ab22b11bce7738e3ae12bc7a124fae60869884..349f8db6e33df065de6a36c842b5f92f13e6c4a5 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -7148,6 +7148,19 @@ Maybe<bool> JSReceiver::HasOwnProperty(Handle<JSReceiver> object,
|
| return Just(attributes.FromJust() != ABSENT);
|
| }
|
|
|
| +Maybe<bool> JSReceiver::HasOwnProperty(Handle<JSReceiver> object,
|
| + uint32_t index) {
|
| + if (object->IsJSObject()) { // Shortcut
|
| + LookupIterator it(object->GetIsolate(), object, index, object,
|
| + LookupIterator::OWN);
|
| + return HasProperty(&it);
|
| + }
|
| +
|
| + Maybe<PropertyAttributes> attributes =
|
| + JSReceiver::GetOwnPropertyAttributes(object, index);
|
| + MAYBE_RETURN(attributes, Nothing<bool>());
|
| + return Just(attributes.FromJust() != ABSENT);
|
| +}
|
|
|
| Maybe<PropertyAttributes> JSReceiver::GetPropertyAttributes(
|
| Handle<JSReceiver> object, Handle<Name> name) {
|
| @@ -7164,6 +7177,12 @@ Maybe<PropertyAttributes> JSReceiver::GetOwnPropertyAttributes(
|
| return GetPropertyAttributes(&it);
|
| }
|
|
|
| +Maybe<PropertyAttributes> JSReceiver::GetOwnPropertyAttributes(
|
| + Handle<JSReceiver> object, uint32_t index) {
|
| + LookupIterator it(object->GetIsolate(), object, index, object,
|
| + LookupIterator::OWN);
|
| + return GetPropertyAttributes(&it);
|
| +}
|
|
|
| Maybe<bool> JSReceiver::HasElement(Handle<JSReceiver> object, uint32_t index) {
|
| LookupIterator it(object->GetIsolate(), object, index, object);
|
|
|