Bug 133762

Summary: [Win] Avoid deadlock with AVFoundation
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: MediaAssignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, glenn, jer.noble, philipj, sergio
Priority: P2 Keywords: InRadar, Regression
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch eric.carlson: review+

Description Brent Fulgham 2014-06-11 13:54:37 PDT
If WebKit is allowed to loop various kinds of media content for long periods of time, we sometimes run into a deadlock between AVFoundationCF and the AVFWrapper mutex used to protect individual AVF playback instances.

This deadlock happens because in some cases a notification will trigger on the main thread, which will immediately begin executing handler content without releasing the AVFWrapper container mutex used to prevent deleting AVFWrapper instances while they are still being used.

For Windows, we should tell WebKit to always invoke these handlers asynchronously so that we do not encounter this deadlock.
Comment 1 Brent Fulgham 2014-06-11 14:03:20 PDT
Created attachment 232901 [details]
Patch
Comment 2 Brent Fulgham 2014-06-11 14:04:15 PDT
<rdar://problem/17128248>
Comment 3 Brent Fulgham 2014-06-11 14:41:28 PDT
Note: The EWS error is due to a problem on the build machine, not this patch.
Comment 4 Brent Fulgham 2014-06-11 14:45:34 PDT
Committed r169842: <http://trac.webkit.org/changeset/169842>