Re: [webkit-dev] RefPtr/PassRefPtr Question

2011-09-08 Thread David Levin
fwiw, check-webkit-style has been fixed: http://trac.webkit.org/changeset/94803 On Wed, Sep 7, 2011 at 7:56 AM, Darin Adler 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 sup

Re: [webkit-dev] RefPtr/PassRefPtr Question

2011-09-07 Thread Darin Adler
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 bu

Re: [webkit-dev] RefPtr/PassRefPtr Question

2011-09-06 Thread Maciej Stachowiak
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

Re: [webkit-dev] RefPtr/PassRefPtr Question

2011-08-31 Thread David Levin
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). dave On Wed, Aug 31, 2011 at 3:28 PM, David Levin wro

Re: [webkit-dev] RefPtr/PassRefPtr Question

2011-08-31 Thread David Levin
Any of these should work: RefPtr myLocal; bool success = myFunc(myLocal); Uses template PassRefPtr(const RefPtr&); Or RefPtr myLocal; bool success = myFunc(myLocal.release()); Or RefPtr myLocal; bool success = myFunc(myLocal.get()); Uses PassRefPtr(T* ptr) The second form is prefered if y

[webkit-dev] RefPtr/PassRefPtr Question

2011-08-31 Thread David Hyatt
I am getting complaints from check-webkit-style in a bug regarding PassRefPtr/RefPtr usage, and I can't figure out what I should be doing. It yells at me no matter what I try. The scenario I have is that a function is wanting to transfer ownership but it's not doing it via a return value. Inste