mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1646774 - Use EnsureInserted instead of Contains + PutEntry. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D80849
This commit is contained in:
parent
03ea5569f1
commit
3ca22ad465
@ -13194,8 +13194,7 @@ void ConnectionPool::TransactionInfo::AddBlockingTransaction(
|
||||
// given. There was the suggestion of encapsulating this in an
|
||||
// insertion-ordered hashtable implementation, which seems like a good idea.
|
||||
// If we had that, this would be the appropriate data structure to use here.
|
||||
if (!mBlocking.Contains(&aTransactionInfo)) {
|
||||
mBlocking.PutEntry(&aTransactionInfo);
|
||||
if (mBlocking.EnsureInserted(&aTransactionInfo)) {
|
||||
mBlockingOrdered.AppendElement(WrapNotNullUnchecked(&aTransactionInfo));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user