On Jun 15, 2012, at 12:12 AM, Roland Steiner <rolandstei...@google.com> wrote:

> Sorry for the late reply, this thread flew under my radar.
> 
> I made the original name change, because I honestly was entirely confused 
> about the meaning of "selfOnlyRef" (it's done by Node on Document, so what is 
> "self"? Why is it needed?) - so I guess we'll have to agree to disagree which 
> one is clearer. ^_-

I can see how the name is less than perfectly clear, but since it's generally 
called as doc->selfOnlyRef(), I think it's pretty clear that the Node doing the 
calling can't be the relevant "self". To me, guardRef() sounded like something 
for short-term protection in the scope of a function (the way we often use a 
local RefPtr on an object that may be destroyed), rather than like what it 
actually does. I think the main downside to selfOnlyRef() is that it's not 
fully clear what "self-only" means even if you know what "self" is. But it's 
hard to explain fully in a function name w/o excess verbosity.

 - Maciej

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to