W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2011

Re: The Structured Clone Wars

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 15 Jul 2011 19:10:03 -0400
Message-ID: <4E20C8CB.4070804@mit.edu>
To: Dean Landolt <dean@deanlandolt.com>
CC: Jonas Sicking <jonas@sicking.cc>, Tom Van Cutsem <tomvc.be@gmail.com>, "Mark S. Miller" <erights@google.com>, public-script-coord@w3.org, es-discuss <es-discuss@mozilla.org>
On 7/15/11 1:37 PM, Dean Landolt wrote:
> Is it really a problem if host objects don't survive in full across serialization
> boundaries?

Depending on what you mean by "in full", yes.

> As you say "All APIs that use structured cloning are pretty
> explicit. Things like Worker.postMessage and IDBObjectStore.put pretty
> explicitly creates a new copy." If you expect host objects to survive
> across that boundary you'll quickly learn otherwise, and it won't take
> long to grok the difference.

The whole point of structured cloning is to pass across objects in a way 
that's pretty difficult to do via serialization using existing ES5 
reflection facilities.

> Java draws a distinction between marshalling and serialization which
> might be useful to this discussion:

Structured clone is closer to marshalling.

Received on Friday, 15 July 2011 23:10:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:04 UTC