mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
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:
parent
02977947a6
commit
d54ca15369
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user