Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 4c8b930ab78253beba6a1f4a28bf2eefb7bd32a7..a2bc28c40bfefae48acca704f015f0d0b4064a1d 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -7589,8 +7589,7 @@ Handle<FixedArray> JSObject::GetEnumPropertyKeys(Handle<JSObject> object, |
MaybeHandle<FixedArray> JSReceiver::GetKeys(Handle<JSReceiver> object, |
KeyCollectionType type, |
KeyFilter filter, |
- GetKeysConversion getConversion, |
- Enumerability enum_policy) { |
+ GetKeysConversion getConversion) { |
USE(ContainsOnlyValidKeys); |
Isolate* isolate = object->GetIsolate(); |
KeyAccumulator accumulator(isolate, filter); |
@@ -7599,10 +7598,6 @@ MaybeHandle<FixedArray> JSReceiver::GetKeys(Handle<JSReceiver> object, |
PrototypeIterator::WhereToEnd end = type == OWN_ONLY |
? PrototypeIterator::END_AT_NON_HIDDEN |
: PrototypeIterator::END_AT_NULL; |
- PropertyAttributes attr_filter = static_cast<PropertyAttributes>( |
- (enum_policy == RESPECT_ENUMERABILITY ? DONT_ENUM : NONE) | |
- PRIVATE_SYMBOL); |
- |
// Only collect keys if access is permitted. |
for (PrototypeIterator iter(isolate, object, |
PrototypeIterator::START_AT_RECEIVER); |
@@ -7636,7 +7631,8 @@ MaybeHandle<FixedArray> JSReceiver::GetKeys(Handle<JSReceiver> object, |
break; |
} |
- JSObject::CollectOwnElementKeys(current, &accumulator, attr_filter); |
+ JSObject::CollectOwnElementKeys(current, &accumulator, |
+ static_cast<PropertyAttributes>(DONT_ENUM)); |
// Add the element keys from the interceptor. |
if (current->HasIndexedInterceptor()) { |
@@ -7649,8 +7645,6 @@ MaybeHandle<FixedArray> JSReceiver::GetKeys(Handle<JSReceiver> object, |
} |
if (filter == SKIP_SYMBOLS) { |
- if (enum_policy == IGNORE_ENUMERABILITY) UNIMPLEMENTED(); |
- |
// We can cache the computed property keys if access checks are |
// not needed and no interceptors are involved. |
// |
@@ -7672,6 +7666,8 @@ MaybeHandle<FixedArray> JSReceiver::GetKeys(Handle<JSReceiver> object, |
accumulator.AddKeys(enum_keys); |
} else { |
DCHECK(filter == INCLUDE_SYMBOLS); |
+ PropertyAttributes attr_filter = |
+ static_cast<PropertyAttributes>(DONT_ENUM | PRIVATE_SYMBOL); |
current->CollectOwnPropertyNames(&accumulator, attr_filter); |
} |