Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(526)

Unified Diff: src/objects.cc

Issue 1929853002: Propagate not-found on proxy target to GetRealNamedProperty (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/objects.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698