Index: src/objects-debug.cc |
diff --git a/src/objects-debug.cc b/src/objects-debug.cc |
index 756f046b2e217e26c50c6368a46e80f0780887b2..22c55ce2021df5605f3574d344afab3748950d2c 100644 |
--- a/src/objects-debug.cc |
+++ b/src/objects-debug.cc |
@@ -302,11 +302,9 @@ void Map::MapVerify() { |
instance_size() < HEAP->Capacity())); |
VerifyHeapPointer(prototype()); |
VerifyHeapPointer(instance_descriptors()); |
- if (instance_descriptors()->number_of_descriptors() == 0) { |
- ASSERT(LastAdded() == kNoneAdded); |
- } else { |
- ASSERT(instance_descriptors()->GetDetails(LastAdded()).index() == |
- instance_descriptors()->number_of_descriptors()); |
+ DescriptorArray* descriptors = instance_descriptors(); |
+ for (int i = 0; i < NumberOfOwnDescriptors(); ++i) { |
+ ASSERT_EQ(i, descriptors->GetDetails(i).descriptor_index() - 1); |
} |
SLOW_ASSERT(instance_descriptors()->IsSortedNoDuplicates()); |
if (HasTransitionArray()) { |
@@ -906,13 +904,13 @@ bool DescriptorArray::IsSortedNoDuplicates() { |
String* current_key = NULL; |
uint32_t current = 0; |
for (int i = 0; i < number_of_descriptors(); i++) { |
- String* key = GetKey(i); |
+ String* key = GetSortedKey(i); |
if (key == current_key) { |
PrintDescriptors(); |
return false; |
} |
current_key = key; |
- uint32_t hash = GetKey(i)->Hash(); |
+ uint32_t hash = GetSortedKey(i)->Hash(); |
if (hash < current) { |
PrintDescriptors(); |
return false; |
@@ -927,13 +925,13 @@ bool TransitionArray::IsSortedNoDuplicates() { |
String* current_key = NULL; |
uint32_t current = 0; |
for (int i = 0; i < number_of_transitions(); i++) { |
- String* key = GetKey(i); |
+ String* key = GetSortedKey(i); |
if (key == current_key) { |
PrintTransitions(); |
return false; |
} |
current_key = key; |
- uint32_t hash = GetKey(i)->Hash(); |
+ uint32_t hash = GetSortedKey(i)->Hash(); |
if (hash < current) { |
PrintTransitions(); |
return false; |