Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8ba8dc17500fca4dbfc7bced901ca46c7061360c
https://github.com/WebKit/WebKit/commit/8ba8dc17500fca4dbfc7bced901ca46c7061360c
Author: Aditya Keerthi <[email protected]>
Date: 2026-04-14 (Tue, 14 Apr 2026)
Changed paths:
M
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeDrawingAreaProxyIOS.mm
Log Message:
-----------
[iOS] Crashes may occur under `refreshRate` observation in
`WKDisplayLinkHandler`
https://bugs.webkit.org/show_bug.cgi?id=312234
rdar://174714313
Reviewed by Richard Robinson, Abrar Rahman Protyasha, and Tim Horton.
`WKDisplayLinkHandler` registers a KVO observer on `[_displayLink display]` for
`refreshRate` at creation time, then removes the observer from
`[_displayLink display]` at invalidation. `-[CADisplayLink display]` is not
stable over the lifetime of the link. Consequently, an exception may be
encountered when removing the observer from a different object than the one
originally tracked.
Fix by observing "display.refreshRate" as a keypath from the `CADisplayLink`
itself instead of observing "refreshRate" directly on the `CADisplay`.
Manually tested by modifying the refresh rate, by toggling low power mode.
This is effectively a follow-up to 306881@main.
*
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeDrawingAreaProxyIOS.mm:
(-[WKDisplayLinkHandler invalidate]):
(-[WKDisplayLinkHandler _createDisplayLink]):
Canonical link: https://commits.webkit.org/311199@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications