Changeset 277122 in webkit
- Timestamp:
- May 6, 2021 2:16:51 PM (3 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r277116 r277122 1 2021-05-06 Jer Noble <jer.noble@apple.com> 2 3 REGRESSION (r276870): ASSERTION FAILED: !m_impl || !m_shouldEnableAssertions || m_impl->wasConstructedOnMainThread() == isMainThread() under WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer 4 https://bugs.webkit.org/show_bug.cgi?id=225371 5 <rdar://problem/77531907> 6 7 Reviewed by Eric Carlson. 8 9 In WebKitLegacy, the weakPtr created by createAVPlayer() is constructed on the WebThread, and 10 dereferenced on the main thread. However, the reason we use a WeakPtr for this call is a long- 11 since fixed bug in AVFoundation. We can just remove the WeakPtr and rely on AVFoundation to 12 not call our block after the observer has been removed in the destructor. 13 14 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: 15 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 16 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): 17 1 18 2021-05-06 Eric Carlson <eric.carlson@apple.com> 2 19 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r277116 r277122 1105 1105 1106 1106 ASSERT(!m_currentTimeObserver); 1107 m_currentTimeObserver = [m_avPlayer addPeriodicTimeObserverForInterval:CMTimeMake(1, 10) queue:dispatch_get_main_queue() usingBlock:[weakThis = makeWeakPtr(*this)] (CMTime time) { 1108 if (weakThis) 1109 weakThis->currentMediaTimeDidChange(PAL::toMediaTime(time)); 1107 m_currentTimeObserver = [m_avPlayer addPeriodicTimeObserverForInterval:CMTimeMake(1, 10) queue:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0) usingBlock:[this] (CMTime time) { 1108 currentMediaTimeDidChange(PAL::toMediaTime(time)); 1110 1109 }]; 1111 1110
Note: See TracChangeset
for help on using the changeset viewer.