Changeset 254590 in webkit
- Timestamp:
- Jan 15, 2020, 11:14:47 AM (7 years ago)
- Location:
- branches/safari-609-branch/Source/WebCore/PAL
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
pal/cocoa/AVFoundationSoftLink.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-609-branch/Source/WebCore/PAL/ChangeLog
r254581 r254590 1 2020-01-14 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r254141. rdar://problem/58559202 4 5 Flaky API Test: TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS 6 https://bugs.webkit.org/show_bug.cgi?id=194340 7 <rdar://problem/50507254> 8 9 Reviewed by Eric Carlson. 10 11 Workaround for AVFoundation crash for OS versions prior to platform fix. This crash occurrs infrequently 12 while triggering KVO due to an internal @property change. Work around the crash by disabling KVO for that 13 property at runtime, by injecting a new class method +automaticallyNotifiesObserversOfSuppressesVideoLayers 14 immediately after soft linking the AVFoundation library. 15 16 * pal/cocoa/AVFoundationSoftLink.mm: 17 (PAL::justReturnsNO): 18 (PAL::AVFoundationLibrary): 19 20 21 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254141 268f45cc-cd09-0410-ab3c-d52691b4dbfc 22 23 2020-01-07 Jer Noble <jer.noble@apple.com> 24 25 Flaky API Test: TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS 26 https://bugs.webkit.org/show_bug.cgi?id=194340 27 <rdar://problem/50507254> 28 29 Reviewed by Eric Carlson. 30 31 Workaround for AVFoundation crash for OS versions prior to platform fix. This crash occurrs infrequently 32 while triggering KVO due to an internal @property change. Work around the crash by disabling KVO for that 33 property at runtime, by injecting a new class method +automaticallyNotifiesObserversOfSuppressesVideoLayers 34 immediately after soft linking the AVFoundation library. 35 36 * pal/cocoa/AVFoundationSoftLink.mm: 37 (PAL::justReturnsNO): 38 (PAL::AVFoundationLibrary): 39 1 40 2020-01-14 Alan Coon <alancoon@apple.com> 2 41 -
branches/safari-609-branch/Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.mm
r254476 r254590 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.