[Webkit-unassigned] [Bug 27337] Add a getter in MessagePortChannel for the PlatformMessagePortChannel

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 16 12:10:25 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27337





--- Comment #5 from John Abd-El-Malek <jam at chromium.org>  2009-07-16 12:10:24 PDT ---
(In reply to comment #3)
> I'm also curious about why this is necessary. The whole point behind
> MessagePortChannel is to create a wrapper around PlatformMessagePortChannel to
> make sure that you never have a raw PlatformMessagePortChannel floating around
> that might not get close()'d.
> 
> Exposing a getter for PlatformMessagePortChannel seems dangerous (it's too easy
> to inadvertently create leaks) and violates the encapsulation that
> MessagePortChannel is intended to provide.

I'm going to upload the chromium port changes soon, which will make things
clearer.

The reason this is needed, which I hinted to above, is that when sending a
message port in a postMessage call, PlatformMessagePortChannel   just gets a
MessagePortChannel::EventData that contains a MessagePortChannel object.  In
the single process case, that's enough.  However for Chrome, when the object
needs to be recreated in a different process, more information from the
platform implementation is needed (namely, the unique identifier for this
message port channel that will be sent to a different process).

Checking in this patch isn't time critical (thanks for the quick review though
David!), so committing it can wait until you guys see the chromium platform
implementation.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list