[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:06:14 PDT 2009


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





--- Comment #4 from John Abd-El-Malek <jam at chromium.org>  2009-07-16 12:06:13 PDT ---
(In reply to comment #2)
> (From update of attachment 32843 [details])
> It would be nice to mention in the bug why this is useful.

I wrote a small description above (i..e re unique identifier), is that not
enough?

> 
> > Index: WebCore/dom/MessagePortChannel.h
> > +        // Getter for m_channel.
> 
> I'd remove this comment as it doesn't really seem to add any information.

ah, I thought it was necessary if the implementation was in a different file
(which was necessary if I was returning a PassRefPtr, but as you point out
below, that's not necessary).

> 
> > +        PassRefPtr<PlatformMessagePortChannel> channel();
> 
> Since this method isn't really passing the ref count to the caller (it retains
> the ref counted pointer), just return PlatformMessagePortChannel* (instead of a
> PassRefPtr).

ah, I still get confused sometimes with all the RefPtr objects.  Thanks, I only
need a pointer.  I wasn't sure if it's ok to pass around raw pointers of ref
counted objects.
> 
> Also, why not just define this inline?
>      return m_channel.get();

this is now possible once there are PassRefPtr (since the
PlatformMessagePortChannel header isn't included here).

-- 
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