Wait for sweepter threads in idle notifcation with large hints.
authorhpayer@chromium.org <hpayer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 29 Apr 2014 19:01:41 +0000 (19:01 +0000)
committerhpayer@chromium.org <hpayer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 29 Apr 2014 19:01:41 +0000 (19:01 +0000)
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

index 381ae50..f054e2c 100644 (file)
@@ -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;
 }