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:
Simon Giesecke 2020-06-26 08:38:28 +00:00
Родитель 03ea5569f1
Коммит 3ca22ad465
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -13194,8 +13194,7 @@ void ConnectionPool::TransactionInfo::AddBlockingTransaction(
// given. There was the suggestion of encapsulating this in an // given. There was the suggestion of encapsulating this in an
// insertion-ordered hashtable implementation, which seems like a good idea. // 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 we had that, this would be the appropriate data structure to use here.
if (!mBlocking.Contains(&aTransactionInfo)) { if (mBlocking.EnsureInserted(&aTransactionInfo)) {
mBlocking.PutEntry(&aTransactionInfo);
mBlockingOrdered.AppendElement(WrapNotNullUnchecked(&aTransactionInfo)); mBlockingOrdered.AppendElement(WrapNotNullUnchecked(&aTransactionInfo));
} }
} }