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

Unified Diff: src/objects-inl.h

Issue 1491743010: Reland of [proxies] Make Object.prototype.isPrototypeOf work with proxies. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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.cc ('k') | src/prototype.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 24c8c14f1ced7a1b8a266342cf287cf81f22b18a..a7b5a68da0e0527f68ed08b8945418cc2087a6e1 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1197,16 +1197,10 @@
!isolate->MayAccess(context, Handle<JSObject>::cast(receiver))) {
return isolate->factory()->null_value();
}
- if (receiver->IsJSProxy()) {
- return JSProxy::GetPrototype(Handle<JSProxy>::cast(receiver));
- }
PrototypeIterator iter(isolate, receiver,
PrototypeIterator::START_AT_RECEIVER);
do {
- iter.AdvanceIgnoringProxies();
- if (PrototypeIterator::GetCurrent(iter)->IsJSProxy()) {
- return PrototypeIterator::GetCurrent(iter);
- }
+ if (!iter.AdvanceFollowingProxies()) return MaybeHandle<Object>();
} while (!iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN));
return PrototypeIterator::GetCurrent(iter);
}
« no previous file with comments | « src/objects.cc ('k') | src/prototype.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698