Bug 1373183 - Part 2: Remove the argument for EnsureTemporaryStorageIsInitialized() since it's unnecessary. r=janv

MozReview-Commit-ID: 9sCHI3XEpIj
This commit is contained in:
Tom Tung
2017-08-23 15:56:06 +08:00
parent 746674b8ba
commit 99a846b32d
2 changed files with 6 additions and 9 deletions

View File

@@ -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;
}

View File

@@ -299,7 +299,7 @@ public:
bool* aCreated);
nsresult
EnsureTemporaryStorageIsInitialized(PersistenceType aPersistenceType);
EnsureTemporaryStorageIsInitialized();
void
OriginClearCompleted(PersistenceType aPersistenceType,