Index: src/store-buffer.cc |
diff --git a/src/store-buffer.cc b/src/store-buffer.cc |
index 9705b60489800feb74d8d09d1a72ca85cf9f0a4b..30b7f25b6604591d72c9cca07838967cc3f500c5 100644 |
--- a/src/store-buffer.cc |
+++ b/src/store-buffer.cc |
@@ -170,7 +170,10 @@ void StoreBuffer::EnsureSpace(intptr_t space_needed) { |
PointerChunkIterator it(heap_); |
MemoryChunk* chunk; |
while ((chunk = it.next()) != NULL) { |
- if (chunk->scan_on_scavenge()) page_has_scan_on_scavenge_flag = true; |
+ if (chunk->scan_on_scavenge()) { |
+ page_has_scan_on_scavenge_flag = true; |
+ break; |
+ } |
} |
if (page_has_scan_on_scavenge_flag) { |
@@ -279,7 +282,10 @@ bool StoreBuffer::PrepareForIteration() { |
MemoryChunk* chunk; |
bool page_has_scan_on_scavenge_flag = false; |
while ((chunk = it.next()) != NULL) { |
- if (chunk->scan_on_scavenge()) page_has_scan_on_scavenge_flag = true; |
+ if (chunk->scan_on_scavenge()) { |
+ page_has_scan_on_scavenge_flag = true; |
+ break; |
+ } |
} |
if (page_has_scan_on_scavenge_flag) { |