Bug 1269319 followup - Don't swap an entry with itself to avoid Variant self assignment. r=bustage

--HG--
extra : rebase_source : 0bf8331f4aba57502bbff07df478c1aeb91c2fc6
This commit is contained in:
Jan de Mooij 2016-05-21 18:08:30 +02:00
parent 02977947a6
commit d54ca15369

View File

@ -779,6 +779,8 @@ class HashTableEntry
}
void swap(HashTableEntry* other) {
if (this == other)
return;
MOZ_ASSERT(isLive());
if (other->isLive()) {
mozilla::Swap(*mem.addr(), *other->mem.addr());