Changeset 269279 in webkit
- Timestamp:
- Nov 2, 2020, 4:40:51 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r269275 r269279 1 2020-11-02 Devin Rousso <drousso@apple.com> 2 3 guard UIScribbleInteraction class property observing behind a LOA check 4 https://bugs.webkit.org/show_bug.cgi?id=218463 5 <rdar://problem/70747966> 6 7 Reviewed by Tim Horton. 8 9 Some apps appear to swizzle `-[NSObject addObserver:forKeyPath:options:context:]` without 10 support for the fact that the object can be a class rather than an instance and therefore 11 crash. Use a LOA check to guard observing `+[UIScribbleInteraction isPencilInputExpected]` 12 so that this doesn't happen, but only until the apps update, at which point they can fix it. 13 14 * platform/cocoa/VersionChecks.h: 15 This appears to be the first instance of observing a class property, so add a new version 16 value for `FirstThatObservesClassProperty`. 17 1 18 2020-11-02 Chris Dumez <cdumez@apple.com> 2 19 -
trunk/Source/WebCore/platform/cocoa/VersionChecks.h
r267995 r269279 66 66 FirstVersionWithiOSAppsOnMacOS = DYLD_IOS_VERSION_FIRST_WITH_IOS_APPS_ON_MACOS, 67 67 FirstWithDataURLFragmentRemoval = DYLD_IOS_VERSION_14_5, 68 FirstThatObservesClassProperty = DYLD_IOS_VERSION_14_5, 68 69 #elif PLATFORM(MAC) 69 70 FirstWithNetworkCache = DYLD_MACOSX_VERSION_10_11, -
trunk/Source/WebKit/ChangeLog
r269273 r269279 1 2020-11-02 Devin Rousso <drousso@apple.com> 2 3 guard UIScribbleInteraction class property observing behind a LOA check 4 https://bugs.webkit.org/show_bug.cgi?id=218463 5 <rdar://problem/70747966> 6 7 Reviewed by Tim Horton. 8 9 Some apps appear to swizzle `-[NSObject addObserver:forKeyPath:options:context:]` without 10 support for the fact that the object can be a class rather than an instance and therefore 11 crash. Use a LOA check to guard observing `+[UIScribbleInteraction isPencilInputExpected]` 12 so that this doesn't happen, but only until the apps update, at which point they can fix it. 13 14 * UIProcess/ios/WKStylusDeviceObserver.mm: 15 (-[WKStylusDeviceObserver start]): 16 (-[WKStylusDeviceObserver stop]): 17 1 18 2020-11-02 James Savage <james.savage@apple.com> 2 19 -
trunk/Source/WebKit/UIProcess/ios/WKStylusDeviceObserver.mm
r268482 r269279 31 31 #import "WebProcessProxy.h" 32 32 #import <UIKit/UIScribbleInteraction.h> 33 #import <WebCore/VersionChecks.h> 33 34 #import <wtf/RetainPtr.h> 34 35 #import <wtf/Seconds.h> … … 84 85 return; 85 86 86 [[UIScribbleInteraction class] addObserver:self forKeyPath:@"isPencilInputExpected" options:NSKeyValueObservingOptionInitial context:nil]; 87 if (WebCore::linkedOnOrAfter(WebCore::SDKVersion::FirstThatObservesClassProperty)) 88 [[UIScribbleInteraction class] addObserver:self forKeyPath:@"isPencilInputExpected" options:NSKeyValueObservingOptionInitial context:nil]; 87 89 } 88 90 … … 93 95 return; 94 96 95 [[UIScribbleInteraction class] removeObserver:self forKeyPath:@"isPencilInputExpected"]; 97 if (WebCore::linkedOnOrAfter(WebCore::SDKVersion::FirstThatObservesClassProperty)) 98 [[UIScribbleInteraction class] removeObserver:self forKeyPath:@"isPencilInputExpected"]; 96 99 } 97 100
Note:
See TracChangeset
for help on using the changeset viewer.