[Webkit-unassigned] [Bug 33731] Remove uses of PtrAndFlags

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 16 19:28:31 PST 2010


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


Darin Adler <darin at apple.com> changed:

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




--- Comment #14 from Darin Adler <darin at apple.com>  2010-01-16 19:28:30 PST ---
(From update of attachment 46756)
> +    OwnPtr<const UChar*> path(fileName.copyWithNullTermination());

This needs to be OwnArrayPtr<const UChar>, not OwnPtr<const UChar*>. Because
delete [] and delete without the "[]" are not the same thing.

> +    OwnPtr<const UChar*> m_queryWithNullTermination;

Same here.

> +    const UChar* copyWithNullTermination() const;

This should probably return PassOwnArrayPtr, not a raw pointer. Otherwise it's
too easy to get the type wrong for the smart pointer (as above). Unfortunately,
there is no PassOwnArrayPtr as of this writing.

Another good possibility would be to have the function take in an
OwnArrayPtr<const UChar>& and set it to point to the newly allocated buffer.

> +    static const unsigned s_refCountMask = 0xfffffffe;

I personally prefer capital hex.

review+ assuming you fix the OwnArrayPtr issue.

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