You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alright then, is it possible for me to add support about VideoFrame? (Prepare for #46811)
Is there a rule about the definition of "cloning"? For VideoFrame, there's a clone and close method. We can choose to 1) clone and close the original object, 2) we can just call clone, 3) we can just pass the original pointer to dest context.
I don't go through that deep detail, but I got a question, is it possible to reuse some web standard (chromium code) to "transfer"?
Currently, WebBlob is just creating a new v8 object in new context referencing same object, which seems a problem. VideoFrame is also reusing this pattern instead of closing the old one and start a new one.
However, passing objects between "contextBridge" seems not identical to "transfer", because transfer requires API to work with.
Activity
[-]contextBridge doesn't clone Cloneable types.[/-][+]`contextBridge` doesn't clone Cloneable types.[/+]reitowo commentedon May 2, 2025
Add this will fix VideoFrame for me temporarily, but this seems not a decent "clone"
codebytere commentedon May 2, 2025
@reitowo there are a few edge cases here - we don't support all cloneable types listed there (some on a case by case basis, like WebBlob)
cc @MarshallOfSound for thoughts on this one
reitowo commentedon May 2, 2025
Alright then, is it possible for me to add support about VideoFrame? (Prepare for #46811)
Is there a rule about the definition of "cloning"? For VideoFrame, there's a clone and close method. We can choose to 1) clone and close the original object, 2) we can just call clone, 3) we can just pass the original pointer to dest context.
nikwen commentedon May 2, 2025
Related: #46863
reitowo commentedon May 7, 2025
I don't go through that deep detail, but I got a question, is it possible to reuse some web standard (chromium code) to "transfer"?
Currently, WebBlob is just creating a new v8 object in new context referencing same object, which seems a problem. VideoFrame is also reusing this pattern instead of closing the old one and start a new one.
However, passing objects between "contextBridge" seems not identical to "transfer", because transfer requires API to work with.
[-]`contextBridge` doesn't clone Cloneable types.[/-][+]`contextBridge` doesn't clone VideoFrame.[/+]