Title: [142766] trunk/Source/WTF
Revision
142766
Author
[email protected]
Date
2013-02-13 11:56:22 -0800 (Wed, 13 Feb 2013)

Log Message

Don't copy Vector<UChar> when passing to new String methods from bug 109617
https://bugs.webkit.org/show_bug.cgi?id=109708

Reviewed by Tony Gentilcore.

Thanks for the catch Darin.

* wtf/text/AtomicString.h:
(WTF::AtomicString::AtomicString):
* wtf/text/StringImpl.h:
(WTF::StringImpl::create8BitIfPossible):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (142765 => 142766)


--- trunk/Source/WTF/ChangeLog	2013-02-13 19:44:19 UTC (rev 142765)
+++ trunk/Source/WTF/ChangeLog	2013-02-13 19:56:22 UTC (rev 142766)
@@ -1,3 +1,17 @@
+2013-02-13  Eric Seidel  <[email protected]>
+
+        Don't copy Vector<UChar> when passing to new String methods from bug 109617
+        https://bugs.webkit.org/show_bug.cgi?id=109708
+
+        Reviewed by Tony Gentilcore.
+
+        Thanks for the catch Darin.
+
+        * wtf/text/AtomicString.h:
+        (WTF::AtomicString::AtomicString):
+        * wtf/text/StringImpl.h:
+        (WTF::StringImpl::create8BitIfPossible):
+
 2013-02-13  Martin Robinson  <[email protected]>
 
         [GTK] Remove remaining dead code from the GLib unicode backend

Modified: trunk/Source/WTF/wtf/text/AtomicString.h (142765 => 142766)


--- trunk/Source/WTF/wtf/text/AtomicString.h	2013-02-13 19:44:19 UTC (rev 142765)
+++ trunk/Source/WTF/wtf/text/AtomicString.h	2013-02-13 19:56:22 UTC (rev 142766)
@@ -50,7 +50,7 @@
     AtomicString(const UChar* s) : m_string(add(s)) { }
 
     template<size_t inlineCapacity>
-    explicit AtomicString(Vector<UChar, inlineCapacity> characters)
+    explicit AtomicString(const Vector<UChar, inlineCapacity>& characters)
         : m_string(add(characters.data(), characters.size()))
     {
     }

Modified: trunk/Source/WTF/wtf/text/StringImpl.h (142765 => 142766)


--- trunk/Source/WTF/wtf/text/StringImpl.h	2013-02-13 19:44:19 UTC (rev 142765)
+++ trunk/Source/WTF/wtf/text/StringImpl.h	2013-02-13 19:56:22 UTC (rev 142766)
@@ -355,7 +355,7 @@
     WTF_EXPORT_STRING_API static PassRefPtr<StringImpl> create(const LChar*, unsigned length);
     WTF_EXPORT_STRING_API static PassRefPtr<StringImpl> create8BitIfPossible(const UChar*, unsigned length);
     template<size_t inlineCapacity>
-    static PassRefPtr<StringImpl> create8BitIfPossible(Vector<UChar, inlineCapacity> vector)
+    static PassRefPtr<StringImpl> create8BitIfPossible(const Vector<UChar, inlineCapacity>& vector)
     {
         return create8BitIfPossible(vector.data(), vector.size());
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to