Make LocalSampleBufferDisplayLayer::requestNotificationWhenReadyForVideoData hop to main thread before hopping to processing thread
<rdar://79413368>
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].