Index: test/cctest/test-heap.cc |
=================================================================== |
--- test/cctest/test-heap.cc (revision 3683) |
+++ test/cctest/test-heap.cc (working copy) |
@@ -746,16 +746,13 @@ |
// Count the number of objects found in the heap. |
int found_count = 0; |
HeapIterator iterator; |
- while (iterator.has_next()) { |
- HeapObject* obj = iterator.next(); |
- CHECK(obj != NULL); |
+ for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) { |
for (int i = 0; i < size; i++) { |
if (*objs[i] == obj) { |
found_count++; |
} |
} |
} |
- CHECK(!iterator.has_next()); |
return found_count; |
} |