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

Unified Diff: src/key-accumulator.cc

Issue 1491743008: [proxies] Add all-can-read/String/Symbol filtering support to GetKeys() (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: critical correctness fix ;-) 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/elements.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/key-accumulator.cc
diff --git a/src/key-accumulator.cc b/src/key-accumulator.cc
index f79561b392ba51b1a77534d539780b3729f6fa7b..468a1f5f28f3fdb47e2af8a41838f5ea8f9ce7c6 100644
--- a/src/key-accumulator.cc
+++ b/src/key-accumulator.cc
@@ -103,6 +103,7 @@ bool KeyAccumulator::AddKey(Handle<Object> key, AddKeyConversion convert) {
if (Handle<Symbol>::cast(key)->is_private()) return false;
return AddSymbolKey(key);
}
+ if (filter_ & SKIP_STRINGS) return false;
// Make sure we do not add keys to a proxy-level (see AddKeysFromProxy).
DCHECK_LE(0, level_string_length_);
// In some cases (e.g. proxies) we might get in String-converted ints which
@@ -235,6 +236,7 @@ MaybeHandle<FixedArray> FilterProxyKeys(Isolate* isolate, Handle<JSProxy> owner,
continue; // Skip this key.
}
}
+ if (filter & SKIP_STRINGS) continue; // Skip this key.
if (filter & ONLY_ENUMERABLE) {
PropertyDescriptor desc;
bool found =
« no previous file with comments | « src/elements.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698