Title: [169842] trunk/Source/WebCore
Revision
169842
Author
[email protected]
Date
2014-06-11 14:43:55 -0700 (Wed, 11 Jun 2014)

Log Message

[Win] Avoid deadlock with AVFoundation
https://bugs.webkit.org/show_bug.cgi?id=133762
<rdar://problem/17128248>

Reviewed by Eric Carlson.

Always invoke our notifications asynchronously so that we do not
execute long-running code while holding the AVFWrapper map mutex
lock. AVFoundationCF callbacks can deadlock if we call into AVF
while holding this lock.


* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (169841 => 169842)


--- trunk/Source/WebCore/ChangeLog	2014-06-11 21:42:24 UTC (rev 169841)
+++ trunk/Source/WebCore/ChangeLog	2014-06-11 21:43:55 UTC (rev 169842)
@@ -1,3 +1,20 @@
+2014-06-11  Brent Fulgham  <[email protected]>
+
+        [Win] Avoid deadlock with AVFoundation
+        https://bugs.webkit.org/show_bug.cgi?id=133762
+        <rdar://problem/17128248>
+
+        Reviewed by Eric Carlson.
+
+        Always invoke our notifications asynchronously so that we do not
+        execute long-running code while holding the AVFWrapper map mutex
+        lock. AVFoundationCF callbacks can deadlock if we call into AVF
+        while holding this lock.
+
+
+        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
+        (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
+
 2014-06-11  Csaba Osztrogonác  <[email protected]>
 
         [CMake] One more URTBF after r169826.

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp (169841 => 169842)


--- trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp	2014-06-11 21:42:24 UTC (rev 169841)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp	2014-06-11 21:43:55 UTC (rev 169842)
@@ -792,7 +792,11 @@
     // so always go through the queue because notifications happen on different threads.
     m_queuedNotifications.append(notification);
 
+#if OS(WINDOWS)
+    bool delayDispatch = true;
+#else
     bool delayDispatch = m_delayCallbacks || !isMainThread();
+#endif
     if (delayDispatch && !m_mainThreadCallPending) {
         m_mainThreadCallPending = true;
         callOnMainThread(mainThreadCallback, this);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to