Backed out changeset 20571bff3967 (bug 1389561). r=backout a=backout
authorShawn Huang <shuang@mozilla.com>
Thu, 12 Oct 2017 15:57:41 +0800
changeset 428457 5b068b66654901146947b3a9e7aa64f08415a579
parent 428456 d13521830f7401fa921b16c28d27253e0e454634
child 428458 e30f8c099e20dce51687c90e84d9e0a8feffccb1
push id97
push userfmarier@mozilla.com
push dateSat, 14 Oct 2017 01:12:59 +0000
reviewersbackout, backout
bugs1389561
milestone58.0a1
backs out20571bff3967d08e90c1b20b1e5175ef27164274
Backed out changeset 20571bff3967 (bug 1389561). r=backout a=backout MozReview-Commit-ID: 8GLZx2ls2C4
dom/quota/ActorsParent.cpp
--- a/dom/quota/ActorsParent.cpp
+++ b/dom/quota/ActorsParent.cpp
@@ -3833,23 +3833,16 @@ QuotaManager::GetQuotaObject(Persistence
   if (aFileSizeOut) {
     *aFileSizeOut = 0;
   }
 
   if (aPersistenceType == PERSISTENCE_TYPE_PERSISTENT) {
     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);
 
   int64_t fileSize;
 
   bool exists;
   rv = aFile->Exists(&exists);
@@ -3925,23 +3918,16 @@ already_AddRefed<QuotaObject>
 QuotaManager::GetQuotaObject(PersistenceType aPersistenceType,
                              const nsACString& aGroup,
                              const nsACString& aOrigin,
                              const nsAString& aPath,
                              int64_t* aFileSizeOut /* = nullptr */)
 {
   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;
   }
 
   nsresult rv;
   nsCOMPtr<nsIFile> file = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, nullptr);
 
@@ -5251,24 +5237,17 @@ QuotaManager::EnsureOriginIsInitializedI
         return rv;
       }
 
       rv = GetTemporaryStorageLimit(storageDir, mTemporaryStorageUsage,
                                     &mTemporaryStorageLimit);
       NS_ENSURE_SUCCESS(rv, rv);
     }
 
-#if defined(NIGHTLY_BUILD)
-  {
-    MutexAutoLock autoLock(mQuotaMutex);
     mTemporaryStorageInitialized = true;
-  }
-#else
-    mTemporaryStorageInitialized = true;
-#endif
 
     CheckTemporaryStorageLimits();
   }
 
   bool created;
   rv = EnsureOriginDirectory(directory, &created);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
@@ -5344,26 +5323,17 @@ QuotaManager::OriginClearCompleted(Persi
 }
 
 void
 QuotaManager::ResetOrClearCompleted()
 {
   AssertIsOnIOThread();
 
   mInitializedOrigins.Clear();
-
-#if defined(NIGHTLY_BUILD)
-  {
-    MutexAutoLock autoLock(mQuotaMutex);
-    mTemporaryStorageInitialized = false;
-  }
-#else
-    mTemporaryStorageInitialized = false;
-#endif
-
+  mTemporaryStorageInitialized = false;
   mStorageInitialized = false;
 
   ReleaseIOThreadObjects();
 }
 
 Client*
 QuotaManager::GetClient(Client::Type aClientType)
 {