зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
03ea5569f1
Коммит
3ca22ad465
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче