Closed Bug 613068 Opened 14 years ago Closed 14 years ago

Structured clone read functions should have an extra "version" argument

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: bent.mozilla, Assigned: jorendorff)

References

Details

Attachments

(1 file)

We need to be able to deserialize buffers that were encoded with an older version of the structured clone writer, keyed off of JS_STRUCTURED_CLONE_VERSION (defined in jsapi.h). If we always maintain backwards compatibility this shouldn't be too much trouble.
Blocking, as this blocks blocker bug 613083.
blocking2.0: --- → betaN+
Who would be a good candidate to work on this? Is this a JS bug, or is it more of a content bug?
I think jorendorff wants this one.
Assignee: general → jorendorff
Attached patch v1Splinter Review
This should get us off the ground. JS_WriteStructuredClone could have a matching out-param, if we care, but I think the macro is just as good for our purposes.

I don't expect we'll need to write old formats, so I don't think JS_WriteStructuredClone needs a version in-param. Let me know if you think otherwise.
Attachment #493072 - Flags: review?(bent.mozilla)
Comment on attachment 493072 [details] [diff] [review]
v1

Looks great! r=me.
Attachment #493072 - Flags: review?(bent.mozilla) → review+
http://hg.mozilla.org/mozilla-central/rev/ad4b7fa4e68d
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: