Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update DisplayLock lifecycle registration for top layer
WillStartLifecycleUpdate is only called when the DisplayLockContext is subscribed to lifecycle updates, and the DisplayLockContext should only be subscribed to lifecycle updates when NeedsLifecycleNotifications is true. The DCHECK at the start of WillStartLifecycleUpdate enforces this. has_pending_top_layer_check_ affects NeedsLifecycleNotifications, which means that we need to unsubscribe from lifecycle notifications when it becomes false. This patch adds a line of code to unsubscribe from notifications when it is set to false. Running slot-content-visibility-18-crash.html with --iterations=500 was failing without this patch. Fixed: 1367977 Change-Id: Ib5aa044d32e87f7dc7f4f8c9ed7cf08e979298ee Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3923916 Reviewed-by: Vladimir Levin <vmpstr@chromium.org> Commit-Queue: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/main@{#1052500}
- Loading branch information