Changeset 254141 in webkit
- Timestamp:
- Jan 7, 2020, 11:27:11 AM (7 years ago)
- Location:
- trunk/Source/WebCore/PAL
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
pal/cocoa/AVFoundationSoftLink.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/PAL/ChangeLog
r254115 r254141 1 2020-01-07 Jer Noble <jer.noble@apple.com> 2 3 Flaky API Test: TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS 4 https://bugs.webkit.org/show_bug.cgi?id=194340 5 <rdar://problem/50507254> 6 7 Reviewed by Eric Carlson. 8 9 Workaround for AVFoundation crash for OS versions prior to platform fix. This crash occurrs infrequently 10 while triggering KVO due to an internal @property change. Work around the crash by disabling KVO for that 11 property at runtime, by injecting a new class method +automaticallyNotifiesObserversOfSuppressesVideoLayers 12 immediately after soft linking the AVFoundation library. 13 14 * pal/cocoa/AVFoundationSoftLink.mm: 15 (PAL::justReturnsNO): 16 (PAL::AVFoundationLibrary): 17 1 18 2020-01-07 Chris Fleizach <cfleizach@apple.com> 2 19 -
trunk/Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.mm
r253064 r254141 31 31 #import <wtf/SoftLinking.h> 32 32 33 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) 33 34 SOFT_LINK_FRAMEWORK_FOR_SOURCE_WITH_EXPORT(PAL, AVFoundation, PAL_EXPORT) 35 #else 36 @interface AVPlayerItem (DisableKVOOnSupressesVideoLayers) 37 + (BOOL)automaticallyNotifiesObserversOfSuppressesVideoLayers; 38 @end 39 40 namespace PAL { 41 42 static BOOL justReturnsNO() 43 { 44 return NO; 45 } 46 47 PAL_EXPORT void* AVFoundationLibrary(bool isOptional = false); 48 void* AVFoundationLibrary(bool isOptional) 49 { 50 static void* frameworkLibrary; 51 static dispatch_once_t once; 52 dispatch_once(&once, ^{ 53 frameworkLibrary = dlopen("/System/Library/Frameworks/AVFoundation.framework/AVFoundation", RTLD_NOW); 54 if (!isOptional) 55 RELEASE_ASSERT_WITH_MESSAGE(frameworkLibrary, "%s", dlerror()); 56 57 class_addMethod(objc_getClass("AVPlayerItem"), @selector(automaticallyNotifiesObserversOfSuppressesVideoLayers), (IMP)justReturnsNO, "B@:"); 58 }); 59 return frameworkLibrary; 60 } 61 62 } 63 #endif 34 64 35 65 SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, AVFoundation, AVAssetCache, PAL_EXPORT)
Note:
See TracChangeset
for help on using the changeset viewer.