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

Is it really true that StructuredDeserialize can't throw in this spec? #391

Open
mkruisselbrink opened this issue Aug 19, 2022 · 0 comments

Comments

@mkruisselbrink
Copy link

https://w3c.github.io/IndexedDB/#database-operations has the (perhaps bold) claim that "Invocations of StructuredDeserialize() in the operation steps below can be asserted not to throw (as indicated by the ! prefix) because they operate only on previous output of StructuredSerializeForStorage()."

I'm not sure if that is a valid argument, and even if it is today it puts requirements on other specs that authors of those specs might not realize. A couple of things that would need to be valid for this to true:

  • any interface that can be serialized for storage needs to be exposed in all global interfaces where indexed db itself is exposed
  • the deserialization steps for any interface must never throw if the input to them was the result of serializing that interface for storage

If those are requirements this spec is actually relying on, that should probably at least be reflected as requirements for the serialization steps and deserialization steps in the HTML spec?

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

1 participant