From e51ae4f9319c17dd0f76a04c8f9cba158b17cd35 Mon Sep 17 00:00:00 2001 From: Jan Varga Date: Wed, 27 May 2020 14:44:17 +0000 Subject: [PATCH] Bug 1621916 - Remove unnecessary local variables; r=dom-workers-and-storage-reviewers,sg Depends on D77069 Differential Revision: https://phabricator.services.mozilla.com/D77070 --- dom/indexedDB/ActorsParent.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp index b6a252a0e98d..8251d94f6f43 100644 --- a/dom/indexedDB/ActorsParent.cpp +++ b/dom/indexedDB/ActorsParent.cpp @@ -17272,8 +17272,6 @@ nsresult QuotaClient::InitOrigin(PersistenceType aPersistenceType, } } - const auto sqliteSuffix = kSQLiteSuffix; - for (const auto& databaseEntry : databaseFilenames) { if (aCanceled) { break; @@ -17302,7 +17300,7 @@ nsresult QuotaClient::InitOrigin(PersistenceType aPersistenceType, return rv; } - rv = databaseFile->Append(databaseFilename + sqliteSuffix); + rv = databaseFile->Append(databaseFilename + kSQLiteSuffix); if (NS_WARN_IF(NS_FAILED(rv))) { REPORT_TELEMETRY_INIT_ERR(kQuotaExternalError, IDB_Append2); return rv; @@ -17661,8 +17659,6 @@ nsresult QuotaClient::GetDatabaseFilenames( return rv; } - const auto sqliteSuffix = kSQLiteSuffix; - nsCOMPtr file; while (NS_SUCCEEDED((rv = entries->GetNextFile(getter_AddRefs(file)))) && file && !aCanceled) { @@ -17717,7 +17713,7 @@ nsresult QuotaClient::GetDatabaseFilenames( } nsDependentSubstring leafNameBase; - if (!GetFilenameBase(leafName, sqliteSuffix, leafNameBase)) { + if (!GetFilenameBase(leafName, kSQLiteSuffix, leafNameBase)) { nsString path; MOZ_ALWAYS_SUCCEEDS(file->GetPath(path)); MOZ_ASSERT(!path.IsEmpty());