[whatwg] Sending MessagePorts after they have started
jonas at sicking.cc
Fri Nov 14 12:31:30 PST 2008
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
> 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.
More information about the whatwg