• Jonathan Backer's avatar
    Reschedule EvictExpiredResources · 4c0d2064
    Jonathan Backer authored
    crrev.com/c/1284435 introduced a bug where if we flushed due to deadline
    but had potentially evictable resources for the future, we would not
    ScheduleEvictExpiredResourcesIn
    
    Also added a micro-optimization where if we evict all resources
    OnMemoryPressure, we also flush to reclaim it immediately.
    
    Added unittests to cover flushing logic. Dependency injected fake
    clock to make test robust.
    
    Bug: 899002
    Change-Id: I50ca934170ebe76e7f48326e53e60df14c32c078
    Reviewed-on: https://chromium-review.googlesource.com/c/1299601
    Commit-Queue: Jonathan Backer <backer@chromium.org>
    Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#603921}
    4c0d2064
resource_pool_unittest.cc 33.2 KB