[webkit-reviews] review granted: [Bug 27001] Fix improper use of PassRefPtr<Node> to RefPtr<Node> : [Attachment 32318] Patch v1
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jul 6 14:16:11 PDT 2009
Geoffrey Garen <ggaren at apple.com> has granted David Kilzer (ddkilzer)
<ddkilzer at webkit.org>'s request for review:
Bug 27001: Fix improper use of PassRefPtr<Node> to RefPtr<Node>
https://bugs.webkit.org/show_bug.cgi?id=27001
Attachment 32318: Patch v1
https://bugs.webkit.org/attachment.cgi?id=32318&action=edit
------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
> (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.
More information about the webkit-reviews
mailing list