[webkit-dev] RefPtr/PassRefPtr Question

David Levin levin at google.com
Thu Sep 8 14:51:28 PDT 2011


fwiw, check-webkit-style has been fixed:
http://trac.webkit.org/changeset/94803

On Wed, Sep 7, 2011 at 7:56 AM, Darin Adler <darin at apple.com> wrote:

> On Sep 6, 2011, at 6:24 PM, Maciej Stachowiak wrote:
>
> > On Aug 31, 2011, at 3:31 PM, David Levin wrote:
> >
> >> Ignore me. I'm missing the "&".
> >>
> >> I suppose if you want a RefPtr&, then the style checker is wrong and the
> parameter should be allowed to be a RefPtr.
> >>
> >> Feel free to file a bug and I'll get to it (-- it may take me a week or
> two at the moment).
> >
> > It should definitely be allowed - it's a good way to represent "I need a
> T and I won't take ownership, but I want to guarantee that my caller is
> holding on to this."
>
> Yes.
>
> Also a good way to represent a RefPtr out parameter for a function with
> more than one return value. Also occasionally useful to make a function that
> conditionally takes ownership of something passed in.
>
>    -- Darin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110908/178542d9/attachment.html>


More information about the webkit-dev mailing list