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

Unified Diff: src/objects.cc

Issue 1494283002: Revert 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.h ('k') | src/objects-inl.h » ('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 6bebf59545e4e573f4960b83ffc8924bf4497e29..5bf38b462484ff077c0860f47082afc5fea5534d 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -1283,13 +1283,12 @@
}
-Maybe<bool> Object::HasInPrototypeChain(Isolate* isolate, Handle<Object> object,
- Handle<Object> proto) {
- PrototypeIterator iter(isolate, object, PrototypeIterator::START_AT_RECEIVER);
+bool Object::HasInPrototypeChain(Isolate* isolate, Object* target) {
+ PrototypeIterator iter(isolate, this, PrototypeIterator::START_AT_RECEIVER);
while (true) {
- if (!iter.AdvanceFollowingProxies()) return Nothing<bool>();
- if (iter.IsAtEnd()) return Just(false);
- if (iter.IsAtEnd(proto)) return Just(true);
+ iter.AdvanceIgnoringProxies();
+ if (iter.IsAtEnd()) return false;
+ if (iter.IsAtEnd(target)) return true;
}
}
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698