Bug 240108

Summary: [WK2][Cocoa] Remove use of CVPixelBufferConformer from WebContent process in MediaPlayerPrivateRemote::nativeImageForCurrentTime()
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: MediaAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, philipj, sergio, simon.fraser, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Jer Noble 2022-05-04 21:35:09 PDT
[WK2][Cocoa] Remove use of CVPixelBufferConformer from WebContent process in MediaPlayerPrivateRemote::nativeImageForCurrentTime()
Comment 1 Radar WebKit Bug Importer 2022-05-04 21:35:34 PDT
<rdar://problem/92773611>
Comment 2 Jer Noble 2022-05-04 21:41:30 PDT
Created attachment 458850 [details]
Patch
Comment 3 youenn fablet 2022-05-05 01:31:19 PDT
Comment on attachment 458850 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=458850&action=review

> Source/WebKit/WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm:66
>      if (!connection().sendSync(Messages::RemoteMediaPlayerProxy::NativeImageForCurrentTime(), Messages::RemoteMediaPlayerProxy::NativeImageForCurrentTime::Reply(sendRight, colorSpace), m_id))

This sync IPC is getting a mach send right to create an IOSurface.
This will probably fail if IOKit is blocked.
Comment 4 Jer Noble 2022-05-05 08:18:27 PDT
(In reply to youenn fablet from comment #3)
> Comment on attachment 458850 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=458850&action=review
> 
> > Source/WebKit/WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm:66
> >      if (!connection().sendSync(Messages::RemoteMediaPlayerProxy::NativeImageForCurrentTime(), Messages::RemoteMediaPlayerProxy::NativeImageForCurrentTime::Reply(sendRight, colorSpace), m_id))
> 
> This sync IPC is getting a mach send right to create an IOSurface.
> This will probably fail if IOKit is blocked.

We'll have to deal with that in another patch.
Comment 5 EWS 2022-05-05 09:14:20 PDT
Committed r293839 (250312@main): <https://commits.webkit.org/250312@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 458850 [details].