wake lock: Tighten checks in WakeLockSentinel::HasPendingActivity()
We were previously only checking if a WakeLockSentinel had any registered event listeners to decide whether it should be kept alive in HasPendingActivity(). This is not enough, as if the sentinel has been released, either by release() being called or because the WakeLock class ended up calling WakeLockManager::ClearWakeLocks(), it should also be eligible for garbage collection even if it still has one or more event listeners (as they will never be called again anyway). Bug: 1015788 Change-Id: I2fa328915e4e1d39344ef3ed5e56c985ef7ad451 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1868875 Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Reviewed-by:Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#707748}
Showing
Please register or sign in to comment