Changeset 148906 in webkit
- Timestamp:
- Apr 22, 2013 1:02:46 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r148903 r148906 1 2013-04-22 Jer Noble <jer.noble@apple.com> 2 3 Cancelling load may cause deadlock in -[AVPlayerItem release] 4 https://bugs.webkit.org/show_bug.cgi?id=114962 5 6 Reviewed by Eric Carlson. 7 8 Work around a bug in AVAssetResourceLoader by using a generic, non-main dispatch queue 9 to recieve AVAssetResourceLoaderDelegate callbacks, and then marshalling those 10 callbacks to the main thread asynchronously. 11 12 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 13 (WebCore::globalLoaderDelegateQueue): Added. 14 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Use the new global queue. 15 (-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]): 16 Marshall the request to the main queue, and return YES (wait) immediately. 17 1 18 2013-04-22 Zan Dobersek <zdobersek@igalia.com> 2 19 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r148545 r148906 200 200 #endif 201 201 202 #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2) 203 static dispatch_queue_t globalLoaderDelegateQueue() 204 { 205 static dispatch_queue_t globalQueue; 206 static dispatch_once_t onceToken; 207 dispatch_once(&onceToken, ^{ 208 globalQueue = dispatch_queue_create("WebCoreAVFLoaderDelegate queue", DISPATCH_QUEUE_SERIAL); 209 }); 210 return globalQueue; 211 } 212 #endif 202 213 203 214 PassOwnPtr<MediaPlayerPrivateInterface> MediaPlayerPrivateAVFoundationObjC::create(MediaPlayer* player) … … 412 423 413 424 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 414 [[m_avAsset.get() resourceLoader] setDelegate:m_loaderDelegate.get() queue: dispatch_get_main_queue()];425 [[m_avAsset.get() resourceLoader] setDelegate:m_loaderDelegate.get() queue:globalLoaderDelegateQueue()]; 415 426 #endif 416 427 … … 1613 1624 return NO; 1614 1625 1615 return m_callback->shouldWaitForLoadingOfResource(loadingRequest); 1626 dispatch_async(dispatch_get_main_queue(), ^{ 1627 if (!m_callback) { 1628 [loadingRequest finishLoadingWithError:nil]; 1629 return; 1630 } 1631 1632 if (!m_callback->shouldWaitForLoadingOfResource(loadingRequest)) 1633 [loadingRequest finishLoadingWithError:nil]; 1634 }); 1635 1636 return YES; 1616 1637 } 1617 1638
Note: See TracChangeset
for help on using the changeset viewer.