Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a35aafeca7bc58e78e68f1009ba7be020f8aa36a
https://github.com/WebKit/WebKit/commit/a35aafeca7bc58e78e68f1009ba7be020f8aa36a
Author: Lily Spiniolas <[email protected]>
Date: 2026-02-16 (Mon, 16 Feb 2026)
Changed paths:
M
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.mm
Log Message:
-----------
UI Process may hang due to deadlock during rubber banding
https://bugs.webkit.org/show_bug.cgi?id=307929
rdar://170410132
Reviewed by Matt Woodrow.
In rare cases, a deadlock may occur between the scrolling thread
and the main thread when reloading a page during rubber banding.
In this scenario, in the scrolling thread, `didRefreshDisplay`
acquires m_scrollingTreeLock. Shortly after, the main thread
acquires m_animationLock via `lockForAnimationChanges`. The
scrolling thread then attempts to acquire `m_animationLock` in
`updateAnimations`, so it must wait for the main thread to unlock it.
The main thread then attempts to acquire `m_scrollingTreeLock` which
the scrolling thread is still holding, so it must wait for
the scrolling thread to unlock it. Both threads wait as a result.
Resolve this by updating `updateAnimations` callsites to occur only
after m_scrollingTreeLock is released.
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.mm:
(WebKit::RemoteLayerTreeEventDispatcher::didRefreshDisplay):
(WebKit::RemoteLayerTreeEventDispatcher::renderingUpdateComplete):
Canonical link: https://commits.webkit.org/307664@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications