[webkit-dev] Lets use PassRefPtr for arguments less; lets use RefPtr for locals and data members more

Ryosuke Niwa rniwa at webkit.org
Mon Jun 20 10:08:27 PDT 2011


On Mon, Jun 20, 2011 at 9:19 AM, Alexey Proskuryakov <ap at webkit.org> wrote:
>
> I think that to make this complete, the rules need to be transitive. A
> function that passes its argument to another function taking a PassRefPtr
> should itself take a PassRefPtr. That's the case in <
> https://bugs.webkit.org/show_bug.cgi?id=52981>, for instance.
>

I agree.  Most of editing bugs come from breaking that transitive rule.

I even want it be enforced by some C++ idiom; e.g. replace all raw pointers
in argument list by PassRawPtr, which cannot be converted to PassRefPtr or
RefPtr.

- Ryosuke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110620/bc8a0c69/attachment.html>


More information about the webkit-dev mailing list