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

Unified Diff: src/objects.cc

Issue 1748923003: [proxies] use [[GetPrototypeOf]] trap in for-in (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | src/prototype.h » ('j') | test/mjsunit/harmony/proxies-for.js » ('J')
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 79dda37866f3e452ed6d1a33862e8375d5fe68b5..fd2a2c6ecf5fad06ae458acb5e92aeb4630c1863 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -8659,7 +8659,7 @@ static Maybe<bool> GetKeys_Internal(Isolate* isolate,
: PrototypeIterator::END_AT_NULL;
for (PrototypeIterator iter(isolate, object,
PrototypeIterator::START_AT_RECEIVER, end);
- !iter.IsAtEnd(); iter.Advance()) {
+ !iter.IsAtEnd();) {
Handle<JSReceiver> current =
PrototypeIterator::GetCurrent<JSReceiver>(iter);
Maybe<bool> result = Just(false); // Dummy initialization.
@@ -8675,6 +8675,9 @@ static Maybe<bool> GetKeys_Internal(Isolate* isolate,
}
MAYBE_RETURN(result, Nothing<bool>());
if (!result.FromJust()) break; // |false| means "stop iterating".
+ if (!iter.AdvanceFollowingProxies(PrototypeIterator::STOP_EARLY)) {
+ return Nothing<bool>();
+ }
}
return Just(true);
}
« no previous file with comments | « no previous file | src/prototype.h » ('j') | test/mjsunit/harmony/proxies-for.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698