Title: [155115] trunk/Source/WTF
- Revision
- 155115
- Author
- [email protected]
- Date
- 2013-09-05 07:31:30 -0700 (Thu, 05 Sep 2013)
Log 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:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (155114 => 155115)
--- trunk/Source/WTF/ChangeLog 2013-09-05 14:23:14 UTC (rev 155114)
+++ trunk/Source/WTF/ChangeLog 2013-09-05 14:31:30 UTC (rev 155115)
@@ -1,3 +1,18 @@
+2013-09-05 Mikhail Pozdnyakov <[email protected]>
+
+ 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:
+
2013-09-05 Jaehun Lim <[email protected]>
Unreviewed. Fix build after r155083
Modified: trunk/Source/WTF/wtf/text/StringBuilder.cpp (155114 => 155115)
--- trunk/Source/WTF/wtf/text/StringBuilder.cpp 2013-09-05 14:23:14 UTC (rev 155114)
+++ trunk/Source/WTF/wtf/text/StringBuilder.cpp 2013-09-05 14:31:30 UTC (rev 155115)
@@ -341,8 +341,7 @@
reallocateBuffer<LChar>(m_length);
else
reallocateBuffer<UChar>(m_length);
- m_string = m_buffer;
- m_buffer = 0;
+ m_string = m_buffer.release();
}
}
Modified: trunk/Source/WTF/wtf/text/WTFString.h (155114 => 155115)
--- trunk/Source/WTF/wtf/text/WTFString.h 2013-09-05 14:23:14 UTC (rev 155114)
+++ trunk/Source/WTF/wtf/text/WTFString.h 2013-09-05 14:31:30 UTC (rev 155115)
@@ -128,7 +128,6 @@
// Construct a string referencing an existing StringImpl.
String(StringImpl* impl) : m_impl(impl) { }
String(PassRefPtr<StringImpl> impl) : m_impl(impl) { }
- String(RefPtr<StringImpl> impl) : m_impl(impl) { }
// Construct a string from a constant string literal.
WTF_EXPORT_STRING_API String(ASCIILiteral characters);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes