diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp index 806873444f21..b6f67edcc750 100644 --- a/dom/indexedDB/ActorsParent.cpp +++ b/dom/indexedDB/ActorsParent.cpp @@ -17243,7 +17243,7 @@ void QuotaClient::StopIdleMaintenance() { mCurrentMaintenance->Abort(); } - for (RefPtr& maintenance : mMaintenanceQueue) { + for (const auto& maintenance : mMaintenanceQueue) { maintenance->Abort(); } } @@ -23082,7 +23082,7 @@ void TransactionBase::CommitOp::CommitOrRollbackAutoIncrementCounts() { mTransaction->GetMode() == IDBTransaction::Mode::Cleanup || mTransaction->GetMode() == IDBTransaction::Mode::VersionChange); - nsTArray>& metadataArray = + const auto& metadataArray = mTransaction->mModifiedAutoIncrementObjectStoreMetadataArray; if (!metadataArray.IsEmpty()) { diff --git a/dom/indexedDB/IDBDatabase.cpp b/dom/indexedDB/IDBDatabase.cpp index 74338d5b545d..5921f5061445 100644 --- a/dom/indexedDB/IDBDatabase.cpp +++ b/dom/indexedDB/IDBDatabase.cpp @@ -746,7 +746,7 @@ void IDBDatabase::AbortTransactions(bool aShouldWarn) { // additional strong references here. WeakTransactionArray transactionsThatNeedWarning; - for (RefPtr& transaction : transactionsToAbort) { + for (const auto& transaction : transactionsToAbort) { MOZ_ASSERT(transaction); MOZ_ASSERT(!transaction->IsFinished()); diff --git a/dom/indexedDB/IDBMutableFile.cpp b/dom/indexedDB/IDBMutableFile.cpp index 018a0ce597f7..b6e5e4f76f10 100644 --- a/dom/indexedDB/IDBMutableFile.cpp +++ b/dom/indexedDB/IDBMutableFile.cpp @@ -115,7 +115,7 @@ void IDBMutableFile::AbortFileHandles() { class MOZ_STACK_CLASS Helper final { public: static void AbortFileHandles( - nsTHashtable>& aTable) { + const nsTHashtable>& aTable) { if (!aTable.Count()) { return; } @@ -123,8 +123,8 @@ void IDBMutableFile::AbortFileHandles() { nsTArray> fileHandlesToAbort; fileHandlesToAbort.SetCapacity(aTable.Count()); - for (auto iter = aTable.Iter(); !iter.Done(); iter.Next()) { - IDBFileHandle* fileHandle = iter.Get()->GetKey(); + for (auto iter = aTable.ConstIter(); !iter.Done(); iter.Next()) { + IDBFileHandle* const fileHandle = iter.Get()->GetKey(); MOZ_ASSERT(fileHandle); fileHandle->AssertIsOnOwningThread(); @@ -139,7 +139,7 @@ void IDBMutableFile::AbortFileHandles() { return; } - for (RefPtr& fileHandle : fileHandlesToAbort) { + for (const auto& fileHandle : fileHandlesToAbort) { MOZ_ASSERT(fileHandle); fileHandle->Abort();