зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1131308 (part 0) - Fix minor problems with RemovingIterator. r=froydnj.
- Its move constructor was moving |aOther.mTable| instead of |aOther|. This meant that |aOther| wasn't being zeroed out appropriately. - test_pldhash_RemovingIterator() was testing Iterator's move constructor instead of RemovingIterator's move constructor, due to a copy/paste mistake. --HG-- extra : rebase_source : 1f4880893875218ddb155c76d329e84d884c0432
This commit is contained in:
Родитель
6ab982c427
Коммит
4a9000e192
|
@ -918,7 +918,7 @@ PLDHashTable::Iterator::Next()
|
|||
}
|
||||
|
||||
PLDHashTable::RemovingIterator::RemovingIterator(RemovingIterator&& aOther)
|
||||
: Iterator(mozilla::Move(aOther.mTable))
|
||||
: Iterator(mozilla::Move(aOther))
|
||||
, mHaveRemoved(aOther.mHaveRemoved)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -236,8 +236,8 @@ static bool test_pldhash_RemovingIterator()
|
|||
// elision, compilers might optimize away move constructor calls for normal
|
||||
// iterator use.
|
||||
{
|
||||
PLDHashTable::Iterator iter1(&t);
|
||||
PLDHashTable::Iterator iter2(mozilla::Move(iter1));
|
||||
PLDHashTable::RemovingIterator iter1(&t);
|
||||
PLDHashTable::RemovingIterator iter2(mozilla::Move(iter1));
|
||||
}
|
||||
|
||||
// First, we insert 64 items, which results in a capacity of 128, and a load
|
||||
|
|
Загрузка…
Ссылка в новой задаче