[w3c/IndexedDB] Use StructuredSerialize/StructuredDeserialize (#171)

So far as I can tell, this is the minimum set of changes needed to replace uses of StructuredClone with StructuredSerialize/StructuredDeserialize, per #170 

Note that when `put()` (etc) is called that this does not simply serialize then operate on the output record -
the record is immediately deserialized to a _clone_ in an abstract _targetRealm_ so that subsequent operations (extract a key, inject a key, etc) are not updated. I added non-normative details explaining this at the various sites.

(Somewhat coincidentally, that's how Blink is actually implemented, since the output of serialization is a opaque set of bytes rather than an easily-traversed structure.)

The definition of operations that operate on the _clone_ could be changed to operate on the record instead. This would require redoing the "extract a key from a value" and "inject a key into a value" section (replace "value" with "record"), and duplicating the "convert a key to a value" and "convert a value to a key" steps with "record" variants.
You can view, comment on, or merge this pull request online at:

  https://github.com/w3c/IndexedDB/pull/171

-- Commit Summary --

  * Use StructuredSerialize/StructuredDeserialize. For #170

-- File Changes --

    M index.bs (106)
    M index.html (331)

-- Patch Links --

https://github.com/w3c/IndexedDB/pull/171.patch
https://github.com/w3c/IndexedDB/pull/171.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/pull/171

Received on Wednesday, 22 March 2017 21:19:28 UTC