Title: [256203] trunk/Source/WTF
- Revision
- 256203
- Author
- [email protected]
- Date
- 2020-02-10 12:51:45 -0800 (Mon, 10 Feb 2020)
Log Message
Unreviewed, speculative build fix on watchOS simulator
https://bugs.webkit.org/show_bug.cgi?id=207183
* wtf/HashTable.h:
(WTF::HashTableCapacityForSize::capacityForSize):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (256202 => 256203)
--- trunk/Source/WTF/ChangeLog 2020-02-10 20:40:00 UTC (rev 256202)
+++ trunk/Source/WTF/ChangeLog 2020-02-10 20:51:45 UTC (rev 256203)
@@ -1,5 +1,13 @@
2020-02-10 Yusuke Suzuki <[email protected]>
+ Unreviewed, speculative build fix on watchOS simulator
+ https://bugs.webkit.org/show_bug.cgi?id=207183
+
+ * wtf/HashTable.h:
+ (WTF::HashTableCapacityForSize::capacityForSize):
+
+2020-02-10 Yusuke Suzuki <[email protected]>
+
Unreviewed, fix build failure on watchOS simulator
https://bugs.webkit.org/show_bug.cgi?id=207183
Modified: trunk/Source/WTF/wtf/HashTable.h (256202 => 256203)
--- trunk/Source/WTF/wtf/HashTable.h 2020-02-10 20:40:00 UTC (rev 256202)
+++ trunk/Source/WTF/wtf/HashTable.h 2020-02-10 20:51:45 UTC (rev 256203)
@@ -327,9 +327,15 @@
{
if (!sizeArg)
return 0;
- uint64_t capacity = roundUpToPowerOfTwo(sizeArg);
- if (shouldExpand(sizeArg, capacity))
+ constexpr unsigned maxCapacity = 1U << 31;
+ UNUSED_PARAM(maxCapacity);
+ ASSERT_UNDER_CONSTEXPR_CONTEXT(sizeArg <= maxCapacity);
+ uint32_t capacity = roundUpToPowerOfTwo(sizeArg);
+ ASSERT_UNDER_CONSTEXPR_CONTEXT(capacity <= maxCapacity);
+ if (shouldExpand(sizeArg, capacity)) {
+ ASSERT_UNDER_CONSTEXPR_CONTEXT((static_cast<uint64_t>(capacity) * 2) <= maxCapacity);
return capacity * 2;
+ }
return capacity;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes