Ensure that GC idle notifications either make progress or stop requesting more GCs.
authorrmcilroy <rmcilroy@chromium.org>
Mon, 30 Mar 2015 17:04:50 +0000 (10:04 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 30 Mar 2015 17:05:02 +0000 (17:05 +0000)
commit00477a5d72e1246d9611966a0b4c708f90a2228e
treea69d36a9f58db80995d1018296beab73094a93ff
parent3cb9f132baeab26b9f14c5cf482eab6c460bcb80
Ensure that GC idle notifications either make progress or stop requesting more GCs.

The V8::IdleNotification will only return 'True' when the gc idle time handler
thinks there is no more GC which can be done. However, the gc idle task handler
can end up repeatedly making no progress (e.g., if it can't finalize a sweep)
which causes idle tasks to be repeatedly scheduled in Chrome which do nothing
but wake up Chrome. Fix this by returning Done if we can't make any progress
within an Idle Round.

BUG=chromium:470615
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#27529}
src/heap/gc-idle-time-handler.cc
src/heap/gc-idle-time-handler.h
test/unittests/heap/gc-idle-time-handler-unittest.cc