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

Unified Diff: src/objects.cc

Issue 1521953002: [proxies] fix access issue when having proxies on the prototype-chain of global objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: better comment 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
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index d32450d97acd84a57176495ce19a2204659dd349..5cf5b41d7205b8299061835a431acefcfd97fa4b 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -1327,6 +1327,7 @@ Maybe<bool> Object::HasInPrototypeChain(Isolate* isolate, Handle<Object> object,
Handle<Object> proto) {
PrototypeIterator iter(isolate, object, PrototypeIterator::START_AT_RECEIVER);
while (true) {
+ if (!iter.HasAccess()) return Just<bool>(false);
if (!iter.AdvanceFollowingProxies()) return Nothing<bool>();
if (iter.IsAtEnd()) return Just(false);
if (iter.IsAtEnd(proto)) return Just(true);

Powered by Google App Engine
This is Rietveld 408576698