Commit ed1d5223 authored by Shawn Huang's avatar Shawn Huang
Browse files

Backed out changeset 20571bff3967 (bug 1389561). r=backout a=backout

MozReview-Commit-ID: 8GLZx2ls2C4

--HG--
extra : amend_source : 0fb28e72650bbebb2e9484987b34510bfe5750f6
extra : transplant_source : %24%8C_MV%D4%FB%A6%10%F1w%3FE%BD%BB9H%FC2%D6
parent 8ff69604
Loading
Loading
Loading
Loading
+1 −31
Original line number Diff line number Diff line
@@ -3838,13 +3838,6 @@ QuotaManager::GetQuotaObject(PersistenceType aPersistenceType,
    return nullptr;
  }

#if defined(NIGHTLY_BUILD)
  {
    MutexAutoLock autoLock(mQuotaMutex);
    MOZ_DIAGNOSTIC_ASSERT(mTemporaryStorageInitialized);
  }
#endif

  nsString path;
  nsresult rv = aFile->GetPath(path);
  NS_ENSURE_SUCCESS(rv, nullptr);
@@ -3930,13 +3923,6 @@ QuotaManager::GetQuotaObject(PersistenceType aPersistenceType,
{
  NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");

#if defined(NIGHTLY_BUILD)
  if (aPersistenceType != PERSISTENCE_TYPE_PERSISTENT){
    MutexAutoLock autoLock(mQuotaMutex);
    MOZ_DIAGNOSTIC_ASSERT(mTemporaryStorageInitialized);
  }
#endif

  if (aFileSizeOut) {
    *aFileSizeOut = 0;
  }
@@ -5256,14 +5242,7 @@ QuotaManager::EnsureOriginIsInitializedInternal(
      NS_ENSURE_SUCCESS(rv, rv);
    }

#if defined(NIGHTLY_BUILD)
  {
    MutexAutoLock autoLock(mQuotaMutex);
    mTemporaryStorageInitialized = true;
  }
#else
    mTemporaryStorageInitialized = true;
#endif

    CheckTemporaryStorageLimits();
  }
@@ -5349,16 +5328,7 @@ QuotaManager::ResetOrClearCompleted()
  AssertIsOnIOThread();

  mInitializedOrigins.Clear();

#if defined(NIGHTLY_BUILD)
  {
    MutexAutoLock autoLock(mQuotaMutex);
  mTemporaryStorageInitialized = false;
  }
#else
    mTemporaryStorageInitialized = false;
#endif

  mStorageInitialized = false;

  ReleaseIOThreadObjects();