Index: src/spaces.cc |
diff --git a/src/spaces.cc b/src/spaces.cc |
index 0af587d2052263e6168b65cb1573ceb5a99203c4..1861c5340391d50db9d7c2ac3e51ce6dd6f2d0da 100644 |
--- a/src/spaces.cc |
+++ b/src/spaces.cc |
@@ -2553,9 +2553,11 @@ bool PagedSpace::EnsureSweeperProgress(intptr_t size_in_bytes) { |
if (collector->AreSweeperThreadsActivated()) { |
if (collector->IsConcurrentSweepingInProgress()) { |
if (collector->StealMemoryFromSweeperThreads(this) < size_in_bytes) { |
- collector->WaitUntilSweepingCompleted(); |
- collector->FinalizeSweeping(); |
- return true; |
+ if (!collector->sequential_sweeping()) { |
+ collector->WaitUntilSweepingCompleted(); |
+ collector->FinalizeSweeping(); |
+ return true; |
+ } |
} |
return false; |
} |