- From: Mark S. Miller <erights@google.com>
- Date: Fri, 13 Mar 2009 14:06:25 -0700
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 <http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#posting-messages-with-message-ports> reads: > 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? -- Cheers, --MarkM
Received on Friday, 13 March 2009 14:06:25 UTC