From 99a846b32d901b7e0ad352ada3cbcd7b5401c142 Mon Sep 17 00:00:00 2001 From: Tom Tung Date: Wed, 23 Aug 2017 15:56:06 +0800 Subject: [PATCH] Bug 1373183 - Part 2: Remove the argument for EnsureTemporaryStorageIsInitialized() since it's unnecessary. r=janv MozReview-Commit-ID: 9sCHI3XEpIj --- dom/quota/ActorsParent.cpp | 13 +++++-------- dom/quota/QuotaManager.h | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/dom/quota/ActorsParent.cpp b/dom/quota/ActorsParent.cpp index a49e1d063da7..5cd8cfa21603 100644 --- a/dom/quota/ActorsParent.cpp +++ b/dom/quota/ActorsParent.cpp @@ -5237,7 +5237,7 @@ QuotaManager::EnsureOriginIsInitializedInternal( return NS_OK; } } else { - rv = EnsureTemporaryStorageIsInitialized(aPersistenceType); + rv = EnsureTemporaryStorageIsInitialized(); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } @@ -5304,18 +5304,16 @@ QuotaManager::EnsureOriginIsInitializedInternal( } nsresult -QuotaManager::EnsureTemporaryStorageIsInitialized( - PersistenceType aPersistenceType) +QuotaManager::EnsureTemporaryStorageIsInitialized() { AssertIsOnIOThread(); - MOZ_ASSERT(aPersistenceType != PERSISTENCE_TYPE_PERSISTENT); MOZ_ASSERT(mStorageInitialized); if (mTemporaryStorageInitialized) { return NS_OK; } - nsresult rv = InitializeRepository(aPersistenceType); + nsresult rv = InitializeRepository(PERSISTENCE_TYPE_DEFAULT); if (NS_WARN_IF(NS_FAILED(rv))) { // We have to cleanup partially initialized quota. RemoveQuota(); @@ -5323,7 +5321,7 @@ QuotaManager::EnsureTemporaryStorageIsInitialized( return rv; } - rv = InitializeRepository(ComplementaryPersistenceType(aPersistenceType)); + rv = InitializeRepository(PERSISTENCE_TYPE_TEMPORARY); if (NS_WARN_IF(NS_FAILED(rv))) { // We have to cleanup partially initialized quota. RemoveQuota(); @@ -7178,8 +7176,7 @@ GetOriginUsageOp::DoDirectoryWork(QuotaManager* aQuotaManager) return rv; } - rv = aQuotaManager->EnsureTemporaryStorageIsInitialized( - PERSISTENCE_TYPE_TEMPORARY); + rv = aQuotaManager->EnsureTemporaryStorageIsInitialized(); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } diff --git a/dom/quota/QuotaManager.h b/dom/quota/QuotaManager.h index fc1ab4e2e032..abe069f9106c 100644 --- a/dom/quota/QuotaManager.h +++ b/dom/quota/QuotaManager.h @@ -299,7 +299,7 @@ public: bool* aCreated); nsresult - EnsureTemporaryStorageIsInitialized(PersistenceType aPersistenceType); + EnsureTemporaryStorageIsInitialized(); void OriginClearCompleted(PersistenceType aPersistenceType,