Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index e04f99ff7ee3311b90ae9418b5b126f17c281af0..c448afa3ce0e3af62d548c0da968869d82b09fac 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -5961,9 +5961,14 @@ void Heap::FilterStoreBufferEntriesOnAboutToBeFreedPages() { |
void Heap::FreeQueuedChunks() { |
if (chunks_queued_for_free_ != NULL) { |
- V8::GetCurrentPlatform()->CallOnBackgroundThread( |
- new UnmapFreeMemoryTask(this, chunks_queued_for_free_), |
- v8::Platform::kShortRunningTask); |
+ if (FLAG_concurrent_sweeping) { |
+ V8::GetCurrentPlatform()->CallOnBackgroundThread( |
+ new UnmapFreeMemoryTask(this, chunks_queued_for_free_), |
+ v8::Platform::kShortRunningTask); |
+ } else { |
+ FreeQueuedChunks(chunks_queued_for_free_); |
+ pending_unmapping_tasks_semaphore_.Signal(); |
+ } |
chunks_queued_for_free_ = NULL; |
} else { |
// If we do not have anything to unmap, we just signal the semaphore |