Title: [232119] trunk/Source/WTF
Revision
232119
Author
mcatanz...@igalia.com
Date
2018-05-23 10:54:01 -0700 (Wed, 23 May 2018)

Log Message

Prohibit shrinking the FastBitVector
https://bugs.webkit.org/show_bug.cgi?id=181020

Reviewed by Oliver Hunt.

Prohibit shrinking the FastBitVector. It's not prepared for this and the current usage does
not require it.

* wtf/FastBitVector.cpp:
(WTF::FastBitVectorWordOwner::resizeSlow):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (232118 => 232119)


--- trunk/Source/WTF/ChangeLog	2018-05-23 17:50:44 UTC (rev 232118)
+++ trunk/Source/WTF/ChangeLog	2018-05-23 17:54:01 UTC (rev 232119)
@@ -1,3 +1,16 @@
+2018-05-22  Michael Catanzaro  <mcatanz...@igalia.com>
+
+        Prohibit shrinking the FastBitVector
+        https://bugs.webkit.org/show_bug.cgi?id=181020
+
+        Reviewed by Oliver Hunt.
+
+        Prohibit shrinking the FastBitVector. It's not prepared for this and the current usage does
+        not require it.
+
+        * wtf/FastBitVector.cpp:
+        (WTF::FastBitVectorWordOwner::resizeSlow):
+
 2018-05-22  Mark Lam  <mark....@apple.com>
 
         StringImpl utf8 conversion should not fail silently.

Modified: trunk/Source/WTF/wtf/FastBitVector.cpp (232118 => 232119)


--- trunk/Source/WTF/wtf/FastBitVector.cpp	2018-05-23 17:50:44 UTC (rev 232118)
+++ trunk/Source/WTF/wtf/FastBitVector.cpp	2018-05-23 17:54:01 UTC (rev 232119)
@@ -42,6 +42,8 @@
 void FastBitVectorWordOwner::resizeSlow(size_t numBits)
 {
     size_t newLength = fastBitVectorArrayLength(numBits);
+
+    RELEASE_ASSERT(newLength >= arrayLength());
     
     // Use fastCalloc instead of fastRealloc because we expect the common
     // use case for this method to be initializing the size of the bitvector.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to