Bug 1373183 - Part 2: Remove the argument for EnsureTemporaryStorageIsInitialized() since it's unnecessary. r=janv
MozReview-Commit-ID: 9sCHI3XEpIj
This commit is contained in:
@@ -5237,7 +5237,7 @@ QuotaManager::EnsureOriginIsInitializedInternal(
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
rv = EnsureTemporaryStorageIsInitialized(aPersistenceType);
|
rv = EnsureTemporaryStorageIsInitialized();
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
@@ -5304,18 +5304,16 @@ QuotaManager::EnsureOriginIsInitializedInternal(
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
QuotaManager::EnsureTemporaryStorageIsInitialized(
|
QuotaManager::EnsureTemporaryStorageIsInitialized()
|
||||||
PersistenceType aPersistenceType)
|
|
||||||
{
|
{
|
||||||
AssertIsOnIOThread();
|
AssertIsOnIOThread();
|
||||||
MOZ_ASSERT(aPersistenceType != PERSISTENCE_TYPE_PERSISTENT);
|
|
||||||
MOZ_ASSERT(mStorageInitialized);
|
MOZ_ASSERT(mStorageInitialized);
|
||||||
|
|
||||||
if (mTemporaryStorageInitialized) {
|
if (mTemporaryStorageInitialized) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult rv = InitializeRepository(aPersistenceType);
|
nsresult rv = InitializeRepository(PERSISTENCE_TYPE_DEFAULT);
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
// We have to cleanup partially initialized quota.
|
// We have to cleanup partially initialized quota.
|
||||||
RemoveQuota();
|
RemoveQuota();
|
||||||
@@ -5323,7 +5321,7 @@ QuotaManager::EnsureTemporaryStorageIsInitialized(
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
rv = InitializeRepository(ComplementaryPersistenceType(aPersistenceType));
|
rv = InitializeRepository(PERSISTENCE_TYPE_TEMPORARY);
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
// We have to cleanup partially initialized quota.
|
// We have to cleanup partially initialized quota.
|
||||||
RemoveQuota();
|
RemoveQuota();
|
||||||
@@ -7178,8 +7176,7 @@ GetOriginUsageOp::DoDirectoryWork(QuotaManager* aQuotaManager)
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
rv = aQuotaManager->EnsureTemporaryStorageIsInitialized(
|
rv = aQuotaManager->EnsureTemporaryStorageIsInitialized();
|
||||||
PERSISTENCE_TYPE_TEMPORARY);
|
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ public:
|
|||||||
bool* aCreated);
|
bool* aCreated);
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
EnsureTemporaryStorageIsInitialized(PersistenceType aPersistenceType);
|
EnsureTemporaryStorageIsInitialized();
|
||||||
|
|
||||||
void
|
void
|
||||||
OriginClearCompleted(PersistenceType aPersistenceType,
|
OriginClearCompleted(PersistenceType aPersistenceType,
|
||||||
|
|||||||
Reference in New Issue
Block a user