[webkit-changes] [WebKit/WebKit] 05300c: Add some extra hardening to prevent crashes in -[W...
Wenson Hsieh
noreply at github.com
Sat Jan 27 15:03:00 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 05300cb368e3a4d9bce9c55e3030bb7570dafcc3
https://github.com/WebKit/WebKit/commit/05300cb368e3a4d9bce9c55e3030bb7570dafcc3
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2024-01-27 (Sat, 27 Jan 2024)
Changed paths:
M Source/WebKit/UIProcess/ios/WKBaseScrollView.mm
Log Message:
-----------
Add some extra hardening to prevent crashes in -[WKScrollingNodeScrollViewDelegate axesToPreventScrollingForPanGestureInScrollView:]
https://bugs.webkit.org/show_bug.cgi?id=268229
rdar://121329521
Reviewed by Aditya Keerthi.
While re-reading some of the crash logs in rdar://121329521, I realized that the speculative
mitigation in 273443 at main only takes care of the case where the scroll view is either directly
removed with a call to `-removeFromSuperview`, or no longer in the view hierarchy. However, it's
possible that a view above the `WKBaseScrollView` was unparented, which might cause UIKit to
internally transition the axis locking pan gesture to either `.failed` or `.cancelled` state and
invoke the action.
Add some extra hardening to be robust in this scenario as well, by bailing in the case where the
axis-locking pan gesture is either cancelled or failed.
* Source/WebKit/UIProcess/ios/WKBaseScrollView.mm:
(-[WKBaseScrollView _updatePanGestureToPreventScrolling]):
Canonical link: https://commits.webkit.org/273613@main
More information about the webkit-changes
mailing list