Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 8b44eceaf006dc61dd0fda63f456956b88a11e94..9f885c7ad8e8e04451c6bedc0d9651531366d809 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -5706,15 +5706,21 @@ MaybeObject* DescriptorArray::Allocate(int number_of_descriptors) { |
void DescriptorArray::SetEnumCache(FixedArray* bridge_storage, |
- FixedArray* new_cache) { |
+ FixedArray* new_cache, |
+ Object* new_index_cache) { |
ASSERT(bridge_storage->length() >= kEnumCacheBridgeLength); |
+ ASSERT(new_index_cache->IsSmi() || new_index_cache->IsFixedArray()); |
if (HasEnumCache()) { |
FixedArray::cast(get(kEnumerationIndexIndex))-> |
set(kEnumCacheBridgeCacheIndex, new_cache); |
+ FixedArray::cast(get(kEnumerationIndexIndex))-> |
+ set(kEnumCacheBridgeIndicesCacheIndex, new_index_cache); |
} else { |
if (IsEmpty()) return; // Do nothing for empty descriptor array. |
FixedArray::cast(bridge_storage)-> |
set(kEnumCacheBridgeCacheIndex, new_cache); |
+ FixedArray::cast(bridge_storage)-> |
+ set(kEnumCacheBridgeIndicesCacheIndex, new_index_cache); |
NoWriteBarrierSet(FixedArray::cast(bridge_storage), |
kEnumCacheBridgeEnumIndex, |
get(kEnumerationIndexIndex)); |