Guard UnmapFreeMemoryTask with a flag.

BUG=chromium:574349
LOG=NO

Review URL: https://codereview.chromium.org/1553233003

Cr-Commit-Position: refs/heads/master@{#33113}
This commit is contained in:
ulan 2016-01-05 05:10:55 -08:00 committed by Commit bot
parent f0e41175fd
commit a373e7530c

View File

@ -6098,9 +6098,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