W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2009

[whatwg] Proposal for enhancing postMessage

From: Mark S. Miller <erights@google.com>
Date: Fri, 13 Mar 2009 14:06:25 -0700
Message-ID: <4d2fac900903131406m2728df75v3f2e66918581fe41@mail.gmail.com>
On Wed, Mar 11, 2009 at 2:30 PM, Drew Wilson <atwilson at google.com> wrote:
> Mark, I won't pretend to completely understand the use cases you're
> describing as I'm not familiar with the prior work you've cited. But my
> understanding of the postMessage() API is that they are primarily useful for
> handing off ports to new owners - your idea of a pass-by-copy serialization
> of a proxy object implies that there's some way to copy the message port,
> and pass that along with the proxy to the new owner, which I don't think is
> possible in general (you can create a new port as part of a MessageChannel,
> but you can't really duplicate an existing port).
> I may be misunderstanding the use case that's driving your proposal, though.

And I may be misunderstanding the postMessage draft spec. But step 4
of 7.4.4 at

> Try to obtain a new port by cloning the messagePort argument
> with the Window object on which the method was invoked as
> the owner of the clone. If this returns an exception, then throw
> that exception and abort these steps.

Doesn't this mean that sending a MessagePort actually sends a clone?

Received on Friday, 13 March 2009 14:06:25 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:47 UTC