summaryrefslogtreecommitdiff
path: root/deps/v8/src/objects/keys.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/objects/keys.cc')
-rw-r--r--deps/v8/src/objects/keys.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/deps/v8/src/objects/keys.cc b/deps/v8/src/objects/keys.cc
index a0796864f1..6aebe60291 100644
--- a/deps/v8/src/objects/keys.cc
+++ b/deps/v8/src/objects/keys.cc
@@ -182,7 +182,8 @@ ExceptionStatus KeyAccumulator::AddKeys(Handle<JSObject> array_like,
MaybeHandle<FixedArray> FilterProxyKeys(KeyAccumulator* accumulator,
Handle<JSProxy> owner,
Handle<FixedArray> keys,
- PropertyFilter filter) {
+ PropertyFilter filter,
+ bool skip_indices) {
if (filter == ALL_PROPERTIES) {
// Nothing to do.
return keys;
@@ -192,6 +193,10 @@ MaybeHandle<FixedArray> FilterProxyKeys(KeyAccumulator* accumulator,
for (int i = 0; i < keys->length(); ++i) {
Handle<Name> key(Name::cast(keys->get(i)), isolate);
if (key->FilterKey(filter)) continue; // Skip this key.
+ if (skip_indices) {
+ uint32_t index;
+ if (key->AsArrayIndex(&index)) continue; // Skip this key.
+ }
if (filter & ONLY_ENUMERABLE) {
PropertyDescriptor desc;
Maybe<bool> found =
@@ -218,7 +223,8 @@ Maybe<bool> KeyAccumulator::AddKeysFromJSProxy(Handle<JSProxy> proxy,
// Postpone the enumerable check for for-in to the ForInFilter step.
if (!is_for_in_) {
ASSIGN_RETURN_ON_EXCEPTION_VALUE(
- isolate_, keys, FilterProxyKeys(this, proxy, keys, filter_),
+ isolate_, keys,
+ FilterProxyKeys(this, proxy, keys, filter_, skip_indices_),
Nothing<bool>());
}
// https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys