From 3ca22ad465cbf52385c8ddcea023d01bf7b924ef Mon Sep 17 00:00:00 2001 From: Simon Giesecke Date: Fri, 26 Jun 2020 08:38:28 +0000 Subject: [PATCH] Bug 1646774 - Use EnsureInserted instead of Contains + PutEntry. r=dom-workers-and-storage-reviewers,janv Differential Revision: https://phabricator.services.mozilla.com/D80849 --- dom/indexedDB/ActorsParent.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp index 62768709aee1..6f21ecf9b610 100644 --- a/dom/indexedDB/ActorsParent.cpp +++ b/dom/indexedDB/ActorsParent.cpp @@ -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)); } }