[Webkit-unassigned] [Bug 27001] Fix improper use of PassRefPtr<Node> to RefPtr<Node>

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 6 14:16:11 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27001


Geoffrey Garen <ggaren at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #32318|review?                     |review+
               Flag|                            |




--- Comment #1 from Geoffrey Garen <ggaren at apple.com>  2009-07-06 14:16:11 PDT ---
(From update of attachment 32318)
>         (WebCore::Editor::increaseSelectionListLevelOrdered): Changed
>         stack-allocated PassRefPtr<Node> to RefPtr<Node> and call
>         release() on returned object to prevent ref count churn.

Technically, I don't think there would be refcount churn, since the default
behavior of PassRefPtr is to give up its reference upon assignment:

        template <typename U> PassRefPtr(const PassRefPtr<U>& o) :
m_ptr(o.releaseRef()) { }

However, this is still a good change for the style reasons you cited.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list