w3c / IndexedDB

Indexed Database API
https://w3c.github.io/IndexedDB/
Other
240 stars 62 forks source link

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

Open mkruisselbrink opened 2 years ago

mkruisselbrink commented 2 years ago

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:

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?