Bug 212693

Summary: Read MediaPlayerPrivateMediaStreamAVFObjC::m_canEnqueueDisplayLayer after the lock
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, jer.noble, philipj, sergio, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

youenn fablet
Reported 2020-06-03 06:46:21 PDT
Read MediaPlayerPrivateMediaStreamAVFObjC::m_canEnqueueDisplayLayer after the lock. As spotted by Eric, there might be an edge case where m_canEnqueueDisplayLayer check would be bypassed: - enqueueVideoSample is called in a background thread, checks m_canEnqueueDisplayLayer which is true and pauses just after the check. - destroyLayers is called, which sets m_canEnqueueDisplayLayer to false. - ensureLayers recreates the display layer which is then not yet initialized - enqueueVideoSample continues and will try to enqueue the sample while m_canEnqueueDisplayLayer is false.
Attachments
Patch (2.72 KB, patch)
2020-06-03 06:49 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2020-06-03 06:49:40 PDT
EWS
Comment 2 2020-06-04 06:01:40 PDT
Committed r262532: <https://trac.webkit.org/changeset/262532> All reviewed patches have been landed. Closing bug and clearing flags on attachment 400915 [details].
Radar WebKit Bug Importer
Comment 3 2020-06-04 06:02:17 PDT
Note You need to log in before you can comment on or make changes to this bug.