W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2008

[whatwg] Sending MessagePorts after they have started

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 14 Nov 2008 12:31:30 -0800
Message-ID: <491DE022.6040201@sicking.cc>
Alexey Proskuryakov wrote:
> 
> Nov 14, 2008, ? 8:50 AM, Jonas Sicking ???????(?):
> 
>> To fix all this I propose that if a port has been started, we don't
>> allow it to be passed to postMessage. If that is done an exception is
>> thrown.
> 
> Could you please explain how this scenario is affected by the port being 
> started? Messages are queued in closed ports until those are started, so 
> I think that it applies word to word to closed ports.

Where the messages are queued are an implementation detail. So you can 
queue messages in the outgoing port until you get word from the 
receiving port that it has been opened. At that point you know where the 
receiving port lives and will always live for the rest of its life and 
can send all messages directly there.

That said, we have to review this whole pass-around-ability thing again. 
You definitely highlighted some pretty serious problems in another 
thread, especially around the need to do cross-process GC. I think the 
communication problem can be solved, i'm less sure about the GC one.

/ Jonas
Received on Friday, 14 November 2008 12:31:30 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:07 UTC