Changeset 287619 in webkit
- Timestamp:
- Jan 5, 2022, 10:20:36 AM (5 years ago)
- Location:
- branches/safari-612-branch/Source/WebKit
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/ios/WKSyntheticTapGestureRecognizer.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-612-branch/Source/WebKit/ChangeLog
r287369 r287619 1 2022-01-05 Russell Epstein <repstein@apple.com> 2 3 Cherry-pick r285431. rdar://problem/87124705 4 5 WKSyntheticTapGestureRecognizer's action targets should be weak pointers 6 https://bugs.webkit.org/show_bug.cgi?id=232812 7 8 Reviewed by Tim Horton. 9 10 Make WKSyntheticTapGestureRecognizer robust against the case where it outlives its WKContentView, by making its 11 "reset", "gesture identified", and "gesture failed" targets weak pointers instead of raw pointers. 12 13 * UIProcess/ios/WKSyntheticTapGestureRecognizer.mm: 14 (-[WKSyntheticTapGestureRecognizer lastTouchedScrollView]): 15 16 Drive-by fix: we can also make `_lastTouchedScrollView` use the __weak ivar attribute instead of WeakObjCPtr, 17 now that __weak is enabled in WebKit2. 18 19 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@285431 268f45cc-cd09-0410-ab3c-d52691b4dbfc 20 21 2021-11-08 Wenson Hsieh <wenson_hsieh@apple.com> 22 23 WKSyntheticTapGestureRecognizer's action targets should be weak pointers 24 https://bugs.webkit.org/show_bug.cgi?id=232812 25 26 Reviewed by Tim Horton. 27 28 Make WKSyntheticTapGestureRecognizer robust against the case where it outlives its WKContentView, by making its 29 "reset", "gesture identified", and "gesture failed" targets weak pointers instead of raw pointers. 30 31 * UIProcess/ios/WKSyntheticTapGestureRecognizer.mm: 32 (-[WKSyntheticTapGestureRecognizer lastTouchedScrollView]): 33 34 Drive-by fix: we can also make `_lastTouchedScrollView` use the __weak ivar attribute instead of WeakObjCPtr, 35 now that __weak is enabled in WebKit2. 36 1 37 2021-12-22 Alan Coon <alancoon@apple.com> 2 38 -
branches/safari-612-branch/Source/WebKit/UIProcess/ios/WKSyntheticTapGestureRecognizer.mm
r258888 r287619 31 31 #import <UIKit/UIGestureRecognizerSubclass.h> 32 32 #import <wtf/RetainPtr.h> 33 #import <wtf/WeakObjCPtr.h>34 33 35 34 @implementation WKSyntheticTapGestureRecognizer { 36 id _gestureIdentifiedTarget;35 __weak id _gestureIdentifiedTarget; 37 36 SEL _gestureIdentifiedAction; 38 id _gestureFailedTarget;37 __weak id _gestureFailedTarget; 39 38 SEL _gestureFailedAction; 40 id _resetTarget;39 __weak id _resetTarget; 41 40 SEL _resetAction; 42 41 RetainPtr<NSNumber> _lastActiveTouchIdentifier; 43 WeakObjCPtr<UIScrollView>_lastTouchedScrollView;42 __weak UIScrollView *_lastTouchedScrollView; 44 43 } 45 44 … … 109 108 - (UIScrollView *)lastTouchedScrollView 110 109 { 111 return _lastTouchedScrollView .get().get();110 return _lastTouchedScrollView; 112 111 } 113 112
Note:
See TracChangeset
for help on using the changeset viewer.