-
Notifications
You must be signed in to change notification settings - Fork 47
Refine StructuredSerializeForStorage behavior #98
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
Comments
Ah yes, good point. Part of this is the more general issue of defining Blob/File better with internal slots etc (#71), but then we do indeed probably want different serialization behavior depending on the |
It seems that with the current specification the problem is the reverse. We always clone data, but we shouldn't. Should we use this issue to track serialization and deserialization generally? |
The immutable nature of blobs should make it indistinguishable (apart from performance) if clones happen or not in most cases. But yes, we definitely need to fix this. I think this is one of the issues that #154 fixes, although I haven't looked at/worked on that PR in a long time... |
The problem is that a |
I think for #154 it would help to have some kind of design document outlining what we are trying to achieve. I don't think we need to reflect all implementation details in the specification, but it should cover observable aspects such as this one. |
nit: There is nothing magical about But otherwise, yes, I think I agree. Ultimately while pretending blobs/files are just byte sequences makes the spec simple, this is just not the reality, and the serialization logic is just one aspect of that. |
I think |
Noted in w3c/IndexedDB#170 and w3c/IndexedDB#203 but better tackled here: HTMLs StructuredSerializedForStorage vs. Blobs/Files doesn't rigorously define that the data is cloned or referenced.
The text was updated successfully, but these errors were encountered: