This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EME] Possible deadlock when aborting a SourceBufferPrivateAVFObjC ap…
…pend operation https://bugs.webkit.org/show_bug.cgi?id=180486 Reviewed by Eric Carlson. It's possible that an abort() operation which is blocked on the ongoing appendBuffer() operation completing will deadlock forever, with either the willProvideContentKeyRequest or didProvideContentKeyRequest callbacks blocking waiting to be run on the main thread (which is itself blocked waiting for the append operation to complete). To break this deadlock, add a new abortSemaphore which is signaled in the abort() method and have the willProvide... and didProvide... methods block both on their own semaphores as well as the abortSemaphore, allowing them to break out even if their main thread calls never get a chance to execute. * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]): (-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]): (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC): (WebCore::SourceBufferPrivateAVFObjC::abort): Canonical link: https://commits.webkit.org/196455@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing 2 changed files with 52 additions and 2 deletions.