| Index: src/objects.cc
 | 
| diff --git a/src/objects.cc b/src/objects.cc
 | 
| index e459332c76b47fd4b4d353d76655e7bfd5a2ddd7..40e3db4cebff6c5e97d4f277c42bb00d8c090bb4 100644
 | 
| --- a/src/objects.cc
 | 
| +++ b/src/objects.cc
 | 
| @@ -15492,8 +15492,7 @@ int Dictionary<Shape, Key>::NumberOfElementsFilterAttributes(
 | 
|    int result = 0;
 | 
|    for (int i = 0; i < capacity; i++) {
 | 
|      Object* k = HashTable<Shape, Key>::KeyAt(i);
 | 
| -    if (HashTable<Shape, Key>::IsKey(k) &&
 | 
| -        !FilterKey(k, filter)) {
 | 
| +    if (HashTable<Shape, Key>::IsKey(k) && !FilterKey(k, filter)) {
 | 
|        PropertyDetails details = DetailsAt(i);
 | 
|        if (details.IsDeleted()) continue;
 | 
|        PropertyAttributes attr = details.attributes();
 | 
| @@ -15583,12 +15582,11 @@ void Dictionary<Shape, Key>::CopyKeysTo(
 | 
|      int index,
 | 
|      PropertyAttributes filter,
 | 
|      typename Dictionary<Shape, Key>::SortMode sort_mode) {
 | 
| -  ASSERT(storage->length() >= NumberOfElementsFilterAttributes(
 | 
| -      static_cast<PropertyAttributes>(NONE)));
 | 
| +  ASSERT(storage->length() >= NumberOfElementsFilterAttributes(filter));
 | 
|    int capacity = HashTable<Shape, Key>::Capacity();
 | 
|    for (int i = 0; i < capacity; i++) {
 | 
|      Object* k = HashTable<Shape, Key>::KeyAt(i);
 | 
| -    if (HashTable<Shape, Key>::IsKey(k)) {
 | 
| +    if (HashTable<Shape, Key>::IsKey(k) && !FilterKey(k, filter)) {
 | 
|        PropertyDetails details = DetailsAt(i);
 | 
|        if (details.IsDeleted()) continue;
 | 
|        PropertyAttributes attr = details.attributes();
 | 
| 
 |