From e0a3541645c79793691c8d65bca299e76edd9aa2 Mon Sep 17 00:00:00 2001 From: "hpayer@chromium.org" Date: Tue, 29 Apr 2014 19:01:41 +0000 Subject: [PATCH] Wait for sweepter threads in idle notifcation with large hints. BUG= R=ulan@chromium.org Review URL: https://codereview.chromium.org/259243002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/heap.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/heap.cc b/src/heap.cc index 381ae506e6..f054e2cc98 100644 --- a/src/heap.cc +++ b/src/heap.cc @@ -4475,6 +4475,12 @@ bool Heap::IdleNotification(int hint) { return true; } + // If the IdleNotifcation is called with a large hint we will wait for + // the sweepter threads here. + if (hint >= kMinHintForFullGC && IsConcurrentSweepingInProgress()) { + WaitUntilSweepingCompleted(); + } + return false; }