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

Unified Diff: src/objects.cc

Issue 2002203002: [api] Add more parameters to Object::GetPropertyNames (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2016-05-06_keys_fast_path_1995263002
Patch Set: addressing nits Created 4 years, 7 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 | « src/objects.h ('k') | src/objects-inl.h » ('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 fa6edfced8ea41e77f42f251ed4e75bb7a180f20..90d53af160f25d07f180640368dae7b72fe9692e 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -6179,7 +6179,8 @@ MaybeHandle<Object> JSReceiver::DefineProperties(Isolate* isolate,
// 5. ReturnIfAbrupt(keys).
Handle<FixedArray> keys;
ASSIGN_RETURN_ON_EXCEPTION(
- isolate, keys, KeyAccumulator::GetKeys(props, OWN_ONLY, ALL_PROPERTIES),
+ isolate, keys, KeyAccumulator::GetKeys(props, KeyCollectionMode::kOwnOnly,
+ ALL_PROPERTIES),
Object);
// 6. Let descriptors be an empty List.
int capacity = keys->length();
@@ -7857,7 +7858,7 @@ MaybeHandle<JSObject> JSObjectWalkVisitor<ContextObject>::StructureWalk(
// an array.
PropertyFilter filter = static_cast<PropertyFilter>(
ONLY_WRITABLE | ONLY_ENUMERABLE | ONLY_CONFIGURABLE);
- KeyAccumulator accumulator(isolate, OWN_ONLY, filter);
+ KeyAccumulator accumulator(isolate, KeyCollectionMode::kOwnOnly, filter);
accumulator.CollectOwnPropertyNames(copy, copy);
Handle<FixedArray> names = accumulator.GetKeys();
for (int i = 0; i < names->length(); i++) {
@@ -8253,10 +8254,11 @@ MaybeHandle<FixedArray> GetOwnValuesOrEntries(Isolate* isolate,
PropertyFilter key_filter =
static_cast<PropertyFilter>(filter & ~ONLY_ENUMERABLE);
- KeyAccumulator accumulator(isolate, OWN_ONLY, key_filter);
+ KeyAccumulator accumulator(isolate, KeyCollectionMode::kOwnOnly, key_filter);
MAYBE_RETURN(accumulator.CollectKeys(object, object),
MaybeHandle<FixedArray>());
- Handle<FixedArray> keys = accumulator.GetKeys(CONVERT_TO_STRING);
+ Handle<FixedArray> keys =
+ accumulator.GetKeys(GetKeysConversion::kConvertToString);
values_or_entries = isolate->factory()->NewFixedArray(keys->length());
int length = 0;
@@ -17507,7 +17509,7 @@ Handle<FixedArray> OrderedHashSet::ConvertToKeysArray(
for (int i = 0; i < length; i++) {
int index = kHashTableStartIndex + nof_buckets + (i * kEntrySize);
Object* key = table->get(index);
- if (convert == CONVERT_TO_STRING && key->IsNumber()) {
+ if (convert == GetKeysConversion::kConvertToString && key->IsNumber()) {
key = *isolate->factory()->NumberToString(handle(key, isolate));
}
result->set(i, key);
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698