Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: test/cctest/heap/heap-utils.cc

Issue 2088223002: [heap] Modernize all *Page iterators to be proper C++ iterators (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Unify w/ LargePageIterator Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/snapshot/deserializer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/heap/heap-utils.cc
diff --git a/test/cctest/heap/heap-utils.cc b/test/cctest/heap/heap-utils.cc
index 8abc5c3b5c63d2e863080effda3d2c0a69a2396a..7d4d4bf40dc31d4d267ab6df5c3e7f18354a2078 100644
--- a/test/cctest/heap/heap-utils.cc
+++ b/test/cctest/heap/heap-utils.cc
@@ -18,10 +18,8 @@ void SealCurrentObjects(Heap* heap) {
heap->CollectAllGarbage();
heap->CollectAllGarbage();
heap->mark_compact_collector()->EnsureSweepingCompleted();
- PageIterator it(heap->old_space());
heap->old_space()->EmptyAllocationInfo();
- while (it.has_next()) {
- Page* page = it.next();
+ for (Page* page : *heap->old_space()) {
page->MarkNeverAllocateForTesting();
}
}
@@ -143,9 +141,8 @@ void SimulateFullSpace(v8::internal::PagedSpace* space) {
void AbandonCurrentlyFreeMemory(PagedSpace* space) {
space->EmptyAllocationInfo();
- PageIterator pit(space);
- while (pit.has_next()) {
- pit.next()->MarkNeverAllocateForTesting();
+ for (Page* page : *space) {
+ page->MarkNeverAllocateForTesting();
}
}
« no previous file with comments | « src/snapshot/deserializer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698