Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 3f3e8ce93cc19d5938c0cfd4388a8f34fb1b5b7b..37827033a8c66f317f40854928964963413d8934 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -720,9 +720,14 @@ MaybeHandle<Object> Object::GetProperty(LookupIterator* it) { |
case LookupIterator::NOT_FOUND: |
case LookupIterator::TRANSITION: |
UNREACHABLE(); |
- case LookupIterator::JSPROXY: |
- return JSProxy::GetProperty(it->isolate(), it->GetHolder<JSProxy>(), |
- it->GetName(), it->GetReceiver()); |
+ case LookupIterator::JSPROXY: { |
+ bool was_found; |
+ MaybeHandle<Object> result = |
+ JSProxy::GetProperty(it->isolate(), it->GetHolder<JSProxy>(), |
+ it->GetName(), it->GetReceiver(), &was_found); |
+ if (!was_found) it->NotFound(); |
+ return result; |
+ } |
case LookupIterator::INTERCEPTOR: { |
bool done; |
Handle<Object> result; |
@@ -762,7 +767,9 @@ MaybeHandle<Object> Object::GetProperty(LookupIterator* it) { |
MaybeHandle<Object> JSProxy::GetProperty(Isolate* isolate, |
Handle<JSProxy> proxy, |
Handle<Name> name, |
- Handle<Object> receiver) { |
+ Handle<Object> receiver, |
+ bool* was_found) { |
+ *was_found = true; |
if (receiver->IsJSGlobalObject()) { |
THROW_NEW_ERROR( |
isolate, |
@@ -795,7 +802,9 @@ MaybeHandle<Object> JSProxy::GetProperty(Isolate* isolate, |
// 7.a Return target.[[Get]](P, Receiver). |
LookupIterator it = |
LookupIterator::PropertyOrElement(isolate, receiver, name, target); |
- return Object::GetProperty(&it); |
+ MaybeHandle<Object> result = Object::GetProperty(&it); |
+ *was_found = it.IsFound(); |
+ return result; |
} |
// 8. Let trapResult be ? Call(trap, handler, «target, P, Receiver»). |
Handle<Object> trap_result; |