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

Unified Diff: src/objects.cc

Issue 1426943007: Revert of "[es6] Partially implement Reflect.ownKeys." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/objects.h ('k') | test/mjsunit/harmony/reflect.js » ('j') | no next file with comments »
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 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);
}
« no previous file with comments | « src/objects.h ('k') | test/mjsunit/harmony/reflect.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698