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

StructuredDeserialize should be used; serialization records cannot be returned from IDL getters #59

Closed
jeremyroman opened this issue May 21, 2019 · 1 comment · Fixed by #61
Milestone

Comments

@jeremyroman
Copy link

The current draft specifies that the values should be serialized, but never deserializes them.

The output of StructuredSerialize (and its kin, like StructuredSerializeForStorage) isn't a cloned ECMAScript value, but a realm-independent serialization record. It can't be returned as the result of a getter, but needs to be passed to StructuredDeserialize at some point to return a new (cloned) ECMAScript value in the appropriate realm. (If that's always the realm that made it, you might even invoke it immediately.)

@yoavweiss yoavweiss added this to the Level 3 milestone Jun 12, 2019
@npm1
Copy link
Contributor

npm1 commented Jun 25, 2019

@wanderview FYI I plan to call StructuredDeserialize immediately on the output of StructuredSerialize as I think that achieves the cloning we intended.

npm1 added a commit that referenced this issue Jun 25, 2019
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

Successfully merging a pull request may close this issue.

3 participants