[Win] Avoid deadlock when interacting with some AVFoundationCF content
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Nov 2013 17:23:21 +0000 (17:23 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Nov 2013 17:23:21 +0000 (17:23 +0000)
commitcb1307fdc4f3a660dfb5812962f5a8681b749c14
tree8b4bf8bb885c2089e821a656d8c0312d15220ff0
parent996395f5855bbf41f65bd4db6ee73c7e35ac63da
[Win] Avoid deadlock when interacting with some AVFoundationCF content
<rdar://problem/15482977> and https://bugs.webkit.org/show_bug.cgi?id=124752

Prevent deadlock caused by conflict over the "mapLock" mutex. Notification handling in the file,
which modify assets and make other changes, are required to happen on the main thread. This
patch enforces this requirement.

Reviewed by Eric Carlson.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::NotificationCallbackData::NotificationCallbackData): Added
(WebCore::AVFWrapper::processNotification): Moved logic from 'notificationCallback', which was
sometimes happening on a background thread.
(WebCore::AVFWrapper::notificationCallback): Dispatch calls to main thread.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp