Changeset 155115 in webkit


Ignore:
Timestamp:
Sep 5, 2013 7:31:30 AM (11 years ago)
Author:
mikhail.pozdnyakov@intel.com
Message:

Remove String(RefPtr<StringImpl>) constructor
https://bugs.webkit.org/show_bug.cgi?id=120767

Reviewed by Anders Carlsson.

The String(RefPtr<StringImpl>) constructor should be removed for the following reasons:

  • It almost does not have clients, so it is unneeded.
  • RefPtr should never be passed by value
  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::shrinkToFit):

  • wtf/text/WTFString.h:
Location:
trunk/Source/WTF
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r155106 r155115  
     12013-09-05  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
     2
     3        Remove String(RefPtr<StringImpl>) constructor
     4        https://bugs.webkit.org/show_bug.cgi?id=120767
     5
     6        Reviewed by Anders Carlsson.
     7
     8        The String(RefPtr<StringImpl>) constructor should be removed for the following reasons:
     9        - It almost does not have clients, so it is unneeded.
     10        - RefPtr should never be passed by value
     11
     12        * wtf/text/StringBuilder.cpp:
     13        (WTF::StringBuilder::shrinkToFit):
     14        * wtf/text/WTFString.h:
     15
    1162013-09-05  Jaehun Lim  <ljaehun.lim@samsung.com>
    217
  • trunk/Source/WTF/wtf/text/StringBuilder.cpp

    r152306 r155115  
    342342        else
    343343            reallocateBuffer<UChar>(m_length);
    344         m_string = m_buffer;
    345         m_buffer = 0;
     344        m_string = m_buffer.release();
    346345    }
    347346}
  • trunk/Source/WTF/wtf/text/WTFString.h

    r153217 r155115  
    129129    String(StringImpl* impl) : m_impl(impl) { }
    130130    String(PassRefPtr<StringImpl> impl) : m_impl(impl) { }
    131     String(RefPtr<StringImpl> impl) : m_impl(impl) { }
    132131
    133132    // Construct a string from a constant string literal.
Note: See TracChangeset for help on using the changeset viewer.