Title: [165281] branches/safari-537.75-branch/Source/WTF
Revision
165281
Author
[email protected]
Date
2014-03-07 13:15:15 -0800 (Fri, 07 Mar 2014)

Log Message

Merge r164408.

Modified Paths

Diff

Modified: branches/safari-537.75-branch/Source/WTF/ChangeLog (165280 => 165281)


--- branches/safari-537.75-branch/Source/WTF/ChangeLog	2014-03-07 21:10:45 UTC (rev 165280)
+++ branches/safari-537.75-branch/Source/WTF/ChangeLog	2014-03-07 21:15:15 UTC (rev 165281)
@@ -1,3 +1,23 @@
+2014-03-07  Matthew Hanson  <[email protected]>
+
+        Merge r164408.
+
+    2014-02-19  Jon Honeycutt  <[email protected]>
+
+            Crash in WTF::StringBuilder::append()
+
+            https://bugs.webkit.org/show_bug.cgi?id=125817
+            <rdar://problem/15671883>
+
+            Reviewed by Oliver Hunt.
+
+            * wtf/text/StringBuilder.cpp:
+            (WTF::expandedCapacity):
+            Ensure that we return a new capacity of at least 'requiredLength' in
+            the case where requiredLength is large. Also, use unsigned rather than
+            size_t for the parameters and the return value, as callers pass
+            unsigned arguments and treat the result as an unsigned int.
+
 2014-02-28  Brent Fulgham  <[email protected]>
 
         Unreviewed build fix.

Modified: branches/safari-537.75-branch/Source/WTF/wtf/text/StringBuilder.cpp (165280 => 165281)


--- branches/safari-537.75-branch/Source/WTF/wtf/text/StringBuilder.cpp	2014-03-07 21:10:45 UTC (rev 165280)
+++ branches/safari-537.75-branch/Source/WTF/wtf/text/StringBuilder.cpp	2014-03-07 21:15:15 UTC (rev 165281)
@@ -32,10 +32,10 @@
 
 namespace WTF {
 
-static size_t expandedCapacity(size_t capacity, size_t newLength)
+static unsigned expandedCapacity(unsigned capacity, unsigned requiredLength)
 {
-    static const size_t minimumCapacity = 16;
-    return std::max(capacity, std::max(minimumCapacity, newLength * 2));
+    static const unsigned minimumCapacity = 16;
+    return std::max(requiredLength, std::max(minimumCapacity, capacity * 2));
 }
 
 void StringBuilder::reifyString() const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to