Bug 1173212 (part 1) - Remove some can't-fail tests in PLDHashTable. r=froydnj.

This commit is contained in:
Nicholas Nethercote 2015-06-10 12:47:18 -07:00
parent 93f272c174
commit a02aa73be7

View File

@ -768,9 +768,6 @@ PLDHashTable::Enumerate(PLDHashEnumerator aEtor, void* aArg)
// even more chaotic to iterate in fully random order, but that's a lot
// more work.
entryAddr += ChaosMode::randomUint32LessThan(capacity) * mEntrySize;
if (entryAddr >= entryLimit) {
entryAddr -= tableSize;
}
}
for (uint32_t e = 0; e < capacity; ++e) {
@ -912,17 +909,12 @@ PLDHashTable::Iterator::Iterator(const PLDHashTable* aTable)
// vary over the course of the for loop) are converted into mEntryOffset and
// mEntryAddr, respectively.
uint32_t capacity = mTable->Capacity();
uint32_t tableSize = capacity * mTable->EntrySize();
char* entryLimit = mEntryAddr + tableSize;
if (ChaosMode::isActive(ChaosMode::HashTableIteration)) {
// 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.
mEntryAddr += ChaosMode::randomUint32LessThan(capacity) * mTable->mEntrySize;
if (mEntryAddr >= entryLimit) {
mEntryAddr -= tableSize;
}
}
}