| Index: test/cctest/test-heap-profiler.cc
|
| ===================================================================
|
| --- test/cctest/test-heap-profiler.cc (revision 3683)
|
| +++ test/cctest/test-heap-profiler.cc (working copy)
|
| @@ -64,10 +64,8 @@
|
| ConstructorHeapProfileTestHelper cons_profile;
|
| i::AssertNoAllocation no_alloc;
|
| i::HeapIterator iterator;
|
| - while (iterator.has_next()) {
|
| - i::HeapObject* obj = iterator.next();
|
| + for (i::HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next())
|
| cons_profile.CollectStats(obj);
|
| - }
|
| CHECK_EQ(0, cons_profile.f_count());
|
| cons_profile.PrintStats();
|
| CHECK_EQ(2, cons_profile.f_count());
|
| @@ -375,10 +373,8 @@
|
| RetainerHeapProfile ret_profile;
|
| i::AssertNoAllocation no_alloc;
|
| i::HeapIterator iterator;
|
| - while (iterator.has_next()) {
|
| - i::HeapObject* obj = iterator.next();
|
| + for (i::HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next())
|
| ret_profile.CollectStats(obj);
|
| - }
|
| RetainerProfilePrinter printer;
|
| ret_profile.DebugPrintStats(&printer);
|
| const char* retainers_of_a = printer.GetRetainers("A");
|
|
|