Index: src/snapshot/deserializer.cc |
diff --git a/src/snapshot/deserializer.cc b/src/snapshot/deserializer.cc |
index 42aff945b8c6b2528e70b9a25326a178933841f9..bb4aa2e139379d90a7a165aee6483ce1daf2c342 100644 |
--- a/src/snapshot/deserializer.cc |
+++ b/src/snapshot/deserializer.cc |
@@ -31,9 +31,7 @@ void Deserializer::DecodeReservation( |
void Deserializer::FlushICacheForNewIsolate() { |
DCHECK(!deserializing_user_code_); |
// The entire isolate is newly deserialized. Simply flush all code pages. |
- PageIterator it(isolate_->heap()->code_space()); |
- while (it.has_next()) { |
- Page* p = it.next(); |
+ for (Page* p : *isolate_->heap()->code_space()) { |
Assembler::FlushICache(isolate_, p->area_start(), |
p->area_end() - p->area_start()); |
} |