Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify cross-agent-cluster structured cloning for various Web Codecs API objects #717

Open
padenot opened this issue Sep 11, 2023 · 3 comments

Comments

@padenot
Copy link
Collaborator

padenot commented Sep 11, 2023

There is https://wpt.fyi/results/webcodecs/videoFrame-serialization.crossAgentCluster.https.html?label=experimental&label=master&aligned, that two implementations out of three seem to pass -- that is, do not allow sending objects across agent clusters.

What do we want to do here, is there a use case for posting to other agents clusters?

@padenot
Copy link
Collaborator Author

padenot commented Sep 11, 2023

@youennf tells me that Safari fails for an unrelated reason -- I'll let him comment on the specifics, but it seems that there is some sort of consistency.

@ChunMinChang
Copy link
Member

Here is another example similar to what web-platform-tests/wpt#41635 (comment) mentioned:

Suppose we have an ImageElement Img in origin A and transferring VideoFrame across origins is valid. The users can do the following things:

  1. Convert Img into VideoFrame V in origin A
  2. Transfer V from origin A to origin B
  3. Convert V into an ImageBitmap M1 in origin B

Since ImageBitmap doesn't define origin-clean in the VideoFrame case, ImageBitmap M1's origin-clean is true. However, creating an ImageBitmap M2 in origin B from an image source in origin A will set the M2's origin-clean to false. Shouldn't M1's origin-clean be false as well?

@dalecurtis
Copy link
Contributor

VideoFrame is the same as ImageData in this example since VideoFrame can't be created from tainted sources. I think this is fine until / unless we want to unlock the ability to work with cross origin VideoFrame objects - at which point we do need origin tracking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants