Bug 1266614 - Fix C4334 in OrderedHashTable.h. r?jandem
MozReview-Commit-ID: 17vReIOrA9k
--- a/js/src/ds/OrderedHashTable.h
+++ b/js/src/ds/OrderedHashTable.h
@@ -630,17 +630,18 @@ class OrderedHashTable
bool rehash(uint32_t newHashShift) {
// If the size of the table is not changing, rehash in place to avoid
// allocating memory.
if (newHashShift == hashShift) {
rehashInPlace();
return true;
}
- size_t newHashBuckets = 1 << (HashNumberSizeBits - newHashShift);
+ size_t newHashBuckets =
+ size_t(1) << (HashNumberSizeBits - newHashShift);
Data** newHashTable = alloc.template pod_malloc<Data*>(newHashBuckets);
if (!newHashTable)
return false;
for (uint32_t i = 0; i < newHashBuckets; i++)
newHashTable[i] = nullptr;
uint32_t newCapacity = uint32_t(newHashBuckets * fillFactor());
Data* newData = alloc.template pod_malloc<Data>(newCapacity);