RESOLVED FIXED 237191
Better isolate RemoteVideoFrameObjectHeap clients from ThreadSafeObjectHeap implementation details
https://bugs.webkit.org/show_bug.cgi?id=237191
Summary Better isolate RemoteVideoFrameObjectHeap clients from ThreadSafeObjectHeap i...
youenn fablet
Reported 2022-02-25 01:14:00 PST
Better isolate RemoteVideoFrameObjectHeap clients from ThreadSafeObjectHeap implementation details
Attachments
Patch (20.95 KB, patch)
2022-02-25 01:29 PST, youenn fablet
no flags
Patch (16.38 KB, patch)
2022-02-25 03:27 PST, youenn fablet
no flags
youenn fablet
Comment 1 2022-02-25 01:29:27 PST
Kimmo Kinnunen
Comment 2 2022-02-25 01:54:12 PST
Comment on attachment 453185 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453185&action=review > Source/WebKit/GPUProcess/media/RemoteVideoFrameObjectHeap.h:43 > +using ThreadSafeVideoFrameHeap = ThreadSafeObjectHeap<RemoteVideoFrameIdentifier, RefPtr<WebCore::MediaSample>>; This doesn't look useful. If you want to make it impossible to call retire, either make the heap a member or try if it's possible to delete the individual method that you think are problematic. > Source/WebKit/GPUProcess/media/RemoteVideoFrameObjectHeap.h:58 > + const WebCore::ProcessIdentity& resourceOwner() const { return m_resourceOwner; } Don't do this. If the resources are marked as owned when they are put to a resource heap, that is already too late. They should be marked as owned preferably as close to creation as possible. E.g. the fact that something is stored to the object heap does not mean the attribution is made. The fact that GPUP creates something on behalf of WP means the attribution is made. So if / when we want to make sure that VideoFrame instances always have attribution, we should add the process identifier as the parameter to all the classes that create VideoFrame.
youenn fablet
Comment 3 2022-02-25 03:26:13 PST
> So if / when we want to make sure that VideoFrame instances always have > attribution, we should add the process identifier as the parameter to all > the classes that create VideoFrame. This is error prone as we might forget to set attribution. AIUI, we are missing to do it in RemoteMediaPlayerProxy for instance. I'll fix RemoteMediaPlayerProxy but I would prefer to enforce setting attribution more easily, preferably by compilation errors or through ASSERTs otherwise.
youenn fablet
Comment 4 2022-02-25 03:27:34 PST
EWS
Comment 5 2022-02-25 08:57:40 PST
Committed r290513 (247797@main): <https://commits.webkit.org/247797@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 453189 [details].
Radar WebKit Bug Importer
Comment 6 2022-02-25 08:58:26 PST
Note You need to log in before you can comment on or make changes to this bug.