Summary: | Make LocalSampleBufferDisplayLayer::requestNotificationWhenReadyForVideoData hop to main thread before hopping to processing thread | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | youenn fablet <youennf> | ||||
Component: | WebRTC | Assignee: | youenn fablet <youennf> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | achristensen, cdumez, eric.carlson, webkit-bug-importer, youennf | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
youenn fablet
2021-06-28 05:14:39 PDT
Created attachment 432384 [details]
Patch
ping review Comment on attachment 432384 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=432384&action=review > Source/WebCore/platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:401 > + m_processingQueue->dispatch([this] { Why is this safe? What guarantees that |this| is still alive when the lambda runs? (In reply to Chris Dumez from comment #4) > Comment on attachment 432384 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=432384&action=review > > > Source/WebCore/platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:401 > > + m_processingQueue->dispatch([this] { > > Why is this safe? What guarantees that |this| is still alive when the lambda > runs? We are doing a dispatchSync in LocalSampleBufferDisplayLayer destructor. Comment on attachment 432384 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=432384&action=review >>> Source/WebCore/platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:401 >>> + m_processingQueue->dispatch([this] { >> >> Why is this safe? What guarantees that |this| is still alive when the lambda runs? > > We are doing a dispatchSync in LocalSampleBufferDisplayLayer destructor. Ah, sneaky :) Seems safe indeed then. Sorry about the noise. Committed r279500 (239352@main): <https://commits.webkit.org/239352@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 432384 [details]. |