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

Update structured cloning for recent HTML changes #277

Closed
domenic opened this issue Mar 20, 2017 · 4 comments
Closed

Update structured cloning for recent HTML changes #277

domenic opened this issue Mar 20, 2017 · 4 comments

Comments

@domenic
Copy link
Member

domenic commented Mar 20, 2017

whatwg/html@97d644c changed structured cloning significantly. I am not sure what the correct changes are here myself; it will likely require coordination with the File API folks.

@annevk
Copy link
Member

annevk commented Mar 21, 2017

So now close() is gone we might be able to not clone at all and just pass the reference from the blob store along since code can no longer change the state of a blob object.

Should maybe make sure File API keeps that invariant alive though.

@domenic
Copy link
Member Author

domenic commented Mar 21, 2017

Oh interesting. If so also let's be sure to revise the two notes in the HTML Standard about how URL parsing uses StructuredSerialize.

@annevk
Copy link
Member

annevk commented Mar 22, 2017

So as long as blob URLs also work for MediaStream and MediaSource this is not going to work, since those two objects are mutable.

@annevk
Copy link
Member

annevk commented Mar 22, 2017

However, those two objects cannot be serialized/deserialized (though MediaStream can be cloned through a locally defined operation). Good times. Per w3c/mediacapture-main#404 blob URLs might go away for MediaStream.

I guess we should just accept that those objects are mutable and what you get depends on when you start reading them...

annevk added a commit that referenced this issue Mar 22, 2017
It was wrong for MediaSource and MediaStream objects, which cannot be
serialized and deserialized, and it’s no longer necessary for Blob
objects as their state cannot be modified. (And it’s also out-of-date
as HTML now has serialization and deserialization operations.)

Fixes #277.
annevk added a commit to whatwg/html that referenced this issue Mar 22, 2017
As per whatwg/url#277 it cannot and does not
need to use StructuredSerialize.
annevk added a commit to whatwg/html that referenced this issue Mar 23, 2017
As per whatwg/url#277 it cannot and does not
need to use StructuredSerialize.
annevk added a commit that referenced this issue Mar 23, 2017
It was wrong for MediaSource and MediaStream objects, which cannot be
serialized and deserialized, and it’s no longer necessary for Blob
objects as their state cannot be modified. (And it’s also out-of-date
as HTML now has serialization and deserialization operations.)

Fixes #277.
alice pushed a commit to alice/html that referenced this issue Jan 8, 2019
As per whatwg/url#277 it cannot and does not
need to use StructuredSerialize.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants