Re: [w3c/IndexedDB] SharedArrayBuffer integration (#152)

Let's walk through the spec. For example, https://w3c.github.io/IndexedDB/#dom-idbobjectstore-put. It uses StructuredClone into a user-agent defined Realm in step 10. I guess we'd want to specify that that user-agent defined Realm is inside the same agent cluster as the source realm, otherwise it'll error in some way.

OK, now it moves on and uses that clone, which contains a SAB whose [[ArrayBufferData]] contains all the bytes. (Not a pointer; SABs don't have pointers. It contains all the bytes. They're the same bytes contained by other SABs, but they're still bytes, not pointers.)

We get to https://w3c.github.io/IndexedDB/#steps-for-storing-a-record-into-an-object-store. The relevant step is:

> Store a record in store containing key as its key and value as its value.

which is the idea of storing things on disk. Storing a SAB whose [[ArrayBufferData]] is a bunch of bytes on disk works fine, just like storing an ArrayBuffer whose [[ArrayBufferData]] is a bunch of bytes.

-- 
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/issues/152#issuecomment-281757347

Received on Wednesday, 22 February 2017 18:27:49 UTC