mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge m-c to a CLOSED TREE f-t
This commit is contained in:
commit
01053f6349
@ -81,6 +81,7 @@ public:
|
||||
*/
|
||||
static uint32_t randomUint32LessThan(uint32_t aBound)
|
||||
{
|
||||
MOZ_ASSERT(aBound != 0);
|
||||
return uint32_t(rand()) % aBound;
|
||||
}
|
||||
};
|
||||
|
@ -910,7 +910,7 @@ PLDHashTable::Iterator::Iterator(const PLDHashTable* aTable)
|
||||
// mEntryAddr, respectively.
|
||||
uint32_t capacity = mTable->Capacity();
|
||||
|
||||
if (ChaosMode::isActive(ChaosMode::HashTableIteration)) {
|
||||
if (ChaosMode::isActive(ChaosMode::HashTableIteration) && capacity > 0) {
|
||||
// Start iterating at a random point in the hashtable. It would be
|
||||
// even more chaotic to iterate in fully random order, but that's a lot
|
||||
// more work.
|
||||
|
Loading…
Reference in New Issue
Block a user