Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 5bf38b462484ff077c0860f47082afc5fea5534d..6bebf59545e4e573f4960b83ffc8924bf4497e29 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -1283,12 +1283,13 @@ |
} |
-bool Object::HasInPrototypeChain(Isolate* isolate, Object* target) { |
- PrototypeIterator iter(isolate, this, PrototypeIterator::START_AT_RECEIVER); |
+Maybe<bool> Object::HasInPrototypeChain(Isolate* isolate, Handle<Object> object, |
+ Handle<Object> proto) { |
+ PrototypeIterator iter(isolate, object, PrototypeIterator::START_AT_RECEIVER); |
while (true) { |
- iter.AdvanceIgnoringProxies(); |
- if (iter.IsAtEnd()) return false; |
- if (iter.IsAtEnd(target)) return true; |
+ if (!iter.AdvanceFollowingProxies()) return Nothing<bool>(); |
+ if (iter.IsAtEnd()) return Just(false); |
+ if (iter.IsAtEnd(proto)) return Just(true); |
} |
} |