Bug 1483062 - Rename HashTable::rehashIfOverRemoved(). r=luke

infallibleRehashIfOverloaded() actually matches what it does.

Also, the patch removes the `overloaded()` test within the function, because
`rehashIfOverloaded()` has the same test.

--HG--
extra : rebase_source : 2799e623fbdd4b8bb82f8b83166752e02a0f9202
This commit is contained in:
Nicholas Nethercote 2018-08-14 11:56:55 +10:00
Родитель d12003b7e5
Коммит eb0a51a708
1 изменённых файлов: 5 добавлений и 8 удалений

Просмотреть файл

@ -1444,7 +1444,7 @@ public:
{
if (mRekeyed) {
mTable.mGen++;
mTable.rehashIfOverRemoved();
mTable.infallibleRehashIfOverloaded();
}
if (mRemoved) {
@ -1892,13 +1892,10 @@ private:
return changeTableSize(newCapacity, aReportFailure);
}
// Infallibly rehash the table if we are overloaded with removals.
void rehashIfOverRemoved()
void infallibleRehashIfOverloaded()
{
if (overloaded()) {
if (rehashIfOverloaded(DontReportFailure) == RehashFailed) {
rehashTableInPlace();
}
if (rehashIfOverloaded(DontReportFailure) == RehashFailed) {
rehashTableInPlace();
}
}
@ -2269,7 +2266,7 @@ public:
void rekeyAndMaybeRehash(Ptr aPtr, const Lookup& aLookup, const Key& aKey)
{
rekeyWithoutRehash(aPtr, aLookup, aKey);
rehashIfOverRemoved();
infallibleRehashIfOverloaded();
}
};