[heap] Fix premature unmapping of new space pages.

concurrent sweeping is disabled, which is not correct.

MemoryAllocator: :CanFreeMemoryChunk returns true for the case when
Change-Id: I560bac0275473445b52fba28b5e647b54f523a3a
Reviewed-on: https://chromium-review.googlesource.com/528081
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45792}
This commit is contained in:
Ulan Degenbaev 2017-06-08 17:45:24 +02:00 committed by Commit Bot
parent f073a20b69
commit e34f802132

View File

@ -416,7 +416,7 @@ bool MemoryAllocator::CanFreeMemoryChunk(MemoryChunk* chunk) {
// because the memory chunk can be in the queue of a sweeper task.
// Chunks in old generation are unmapped if they are empty.
DCHECK(chunk->InNewSpace() || chunk->SweepingDone());
return !chunk->InNewSpace() || mc == nullptr || !FLAG_concurrent_sweeping ||
return !chunk->InNewSpace() || mc == nullptr ||
!mc->sweeper().sweeping_in_progress();
}