#491: M1393367 M1452202
This commit is contained in:
parent
8ebe4e8e55
commit
48862f0a4d
|
@ -2771,7 +2771,7 @@ FilterNodeArithmeticCombineSoftware::SetAttribute(uint32_t aIndex,
|
||||||
uint32_t aSize)
|
uint32_t aSize)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(aIndex == ATT_ARITHMETIC_COMBINE_COEFFICIENTS);
|
MOZ_ASSERT(aIndex == ATT_ARITHMETIC_COMBINE_COEFFICIENTS);
|
||||||
MOZ_ASSERT(aSize == 4);
|
MOZ_RELEASE_ASSERT(aSize == 4);
|
||||||
|
|
||||||
mK1 = aFloat[0];
|
mK1 = aFloat[0];
|
||||||
mK2 = aFloat[1];
|
mK2 = aFloat[1];
|
||||||
|
|
|
@ -220,17 +220,17 @@ PLDHashTable::operator=(PLDHashTable&& aOther)
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destruct |this|.
|
// |mOps| and |mEntrySize| are required to stay the same, they're
|
||||||
this->~PLDHashTable();
|
|
||||||
|
|
||||||
// |mOps| and |mEntrySize| are const so we can't assign them. Instead, we
|
|
||||||
// require that they are equal. The justification for this is that they're
|
|
||||||
// conceptually part of the type -- indeed, if PLDHashTable was a templated
|
// conceptually part of the type -- indeed, if PLDHashTable was a templated
|
||||||
// type like nsTHashtable, they *would* be part of the type -- so it only
|
// type like nsTHashtable, they *would* be part of the type -- so it only
|
||||||
// makes sense to assign in cases where they match.
|
// makes sense to assign in cases where they match.
|
||||||
MOZ_RELEASE_ASSERT(mOps == aOther.mOps);
|
MOZ_RELEASE_ASSERT(mOps == aOther.mOps);
|
||||||
MOZ_RELEASE_ASSERT(mEntrySize == aOther.mEntrySize);
|
MOZ_RELEASE_ASSERT(mEntrySize == aOther.mEntrySize);
|
||||||
|
|
||||||
|
// Reconstruct |this|.
|
||||||
|
this->~PLDHashTable();
|
||||||
|
new (this) PLDHashTable(aOther.mOps, aOther.mEntrySize, 0);
|
||||||
|
|
||||||
// Move non-const pieces over.
|
// Move non-const pieces over.
|
||||||
mHashShift = Move(aOther.mHashShift);
|
mHashShift = Move(aOther.mHashShift);
|
||||||
mEntryCount = Move(aOther.mEntryCount);
|
mEntryCount = Move(aOther.mEntryCount);
|
||||||
|
|
Loading…
Reference in New Issue