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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 6 14:13:41 PDT 2009


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

           Summary: Fix improper use of PassRefPtr<Node> to RefPtr<Node>
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML Editing
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ddkilzer at webkit.org



David Kilzer (ddkilzer) <ddkilzer at webkit.org> changed:

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


Created an attachment (id=32318)
 --> (https://bugs.webkit.org/attachment.cgi?id=32318)
Patch v1

Fix improper use of PassRefPtr<Node> to RefPtr<Node>

Reviewed by NOBODY (OOPS!).

PassRefPtr<> should only be used for arguments to functions that take ownership
of the object, or as return values from functions that relinquish ownership of
the object.

* editing/Editor.cpp:
(WebCore::Editor::increaseSelectionListLevelOrdered): Changed stack-allocated
PassRefPtr<Node> to RefPtr<Node> and call release() on returned object to
prevent ref count churn.
(WebCore::Editor::increaseSelectionListLevelUnordered): Ditto.

-- 
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