Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 3d453c2679b7a933ddfdd5694a5eefa9a86012b1..5bdfb0df7d8581b46c33a011947d9069809e7a67 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -1049,15 +1049,24 @@ bool Object::HasSpecificClassOf(String* name) { |
MaybeHandle<Object> Object::GetProperty(Handle<Object> object, |
Handle<Name> name) { |
LookupIterator it(object, name); |
+ if (!it.IsFound()) return it.factory()->undefined_value(); |
return GetProperty(&it); |
} |
MaybeHandle<Object> Object::GetElement(Isolate* isolate, Handle<Object> object, |
uint32_t index) { |
LookupIterator it(isolate, object, index); |
+ if (!it.IsFound()) return it.factory()->undefined_value(); |
return GetProperty(&it); |
} |
+Handle<Object> JSReceiver::GetDataProperty(Handle<JSReceiver> object, |
+ Handle<Name> name) { |
+ LookupIterator it(object, name, |
+ LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR); |
+ if (!it.IsFound()) return it.factory()->undefined_value(); |
+ return GetDataProperty(&it); |
+} |
MaybeHandle<Object> Object::SetElement(Isolate* isolate, Handle<Object> object, |
uint32_t index, Handle<Object> value, |