On Jun 15, 2012, at 12:22 PM, Ryosuke Niwa <rn...@webkit.org> wrote:
> On Fri, Jun 15, 2012 at 12:14 PM, Maciej Stachowiak <m...@apple.com> wrote: > I am not sure how to get the key points across without being accurate or > misleading. A version that I think explains the complete design without > saying anything false or misleading: > > refTheDocumentItselfButUnlikeTheRegularRefDontPreventTheDocumentsChildrenFromBeingRemovedToAvoidCyclesWhenRefingTheOwnerDocument > > To make a reasonable name we probably need to focus on one of these aspects. > Perhaps one approach is to focus on when and why you should use this call, > rather than what it does: > > refAsOwnerDocument() / m_refCountAsOwnerDocument (or m_ownerDocumentRefCount) > refAvoidingCycles() (or cycleAvoidingRef()) / m_cycleAvoidingRefCount > > We probably need to qualify kinds of cycles we're avoiding: ones through > descendents (or subtree); e.g. this doesn't avoid cycles with JSC/V8 objects. That's one reason I like refAsOwnerDocument() slightly better. It tells you when to use it, and when Node.cpp does m_document->refAsOwnerDocument(), it will make sense in context. However, if you wanted to make the other version more exactingly precise, you could say something like refAvodingCyclesWithDescendents(). Regards, Maciej
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev