| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index 5b41e46d0ff0f7335ceefa6665ad7b7d7a64293a..a718fded51d9ffcf01a075553e89831cfcbe8d07 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -7177,6 +7177,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) {
|
| @@ -7193,6 +7206,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);
|
|
|