Backed out changeset 20571bff3967 (bug 1389561). r=backout a=backout
authorShawn Huang <shuang@mozilla.com>
Thu, 12 Oct 2017 15:57:41 +0800
changeset 679173 bc7a5be76b723cf6aac1a919156e74997c5f4902
parent 679172 191c4f1b5992973a6910e4999081e46c5e5a2b56
child 679174 e4c6ce7b3fe9f328d2d2c2b06d5b3a9129314f82
child 679177 42e2e9058240fb4645b87c13a966eaa9bb5d2d42
child 679228 0bf3475dcb24c8c80d5d739fbeea1869c8e4df0a
child 679238 b1763a850df496db4615f71804232411a9eaeb24
child 679245 7b718490e83368716e50f02bb32a08d8d03500c7
child 679246 e07bf6a191f6ce3bdac182df3c57602de65cd708
child 679263 608cdfc0f9e718fc97800964a2ce973711b75dc0
child 679265 50406c8416167addeeb90c5e4e051e99c3ecbef1
child 679266 0377b12cb9681e000fa88387aaf9773585fe9a80
child 679275 c317ee1c65d7fabdfbf4235218071e43baea3c70
child 679276 1b22af57a19c2ca4a38be7c40bf763405eb3e6a2
child 679277 977b46f269c6e236afd84bbae80a23413bafb457
child 679283 95a7f53e5ea1d7a8be56fffa1e2f3424f18dcca6
child 679285 fe797156561fbac2166a1aed6a23b56f76af5521
child 679290 e1a49a220793087d05188f49b4851fd4c474b6e4
child 679292 a7f413cd30c8b5e7ae732bc3b50c3e5d3c5c8601
child 679293 0fa1597c91ab04d8a9e1a45c085fef09b4677985
child 679301 a9144a282fe8e3bd8177d0be4bf6799ec5b121c4
child 679320 35c23416bbfb929b20561a1a330497a228df2974
child 679321 f31c76aad133959a15fd6259fc3bbef48385f530
child 679324 459293430b4bca060dd9a30aeb40c3376498dd05
child 679325 90554881b6b6fc2465db70772a8b37eb1e51b05c
child 679378 76c781b6279a3ab53e0e5ad370dd9dfe625799d2
child 679415 71d99e30340ce1f151310bd4603d9cc621310e24
child 679454 a2be1cd96efbaacd9f26624e4bda82538cf69b81
child 679455 80900cb22141622dbfdefef7c583766860ed3905
child 679474 7378d684b44ca12eb0c21d8db54416ffe4b4fcab
child 679486 4f209b87784f7ac15ea6f9ac0d0de688e547d6b9
child 679508 f22c0b20853fe59370451a9687e0f1ed445bc4e1
child 679541 afb1b08247bb05e527b6b908edfaeb1f37cbfb9b
child 679632 02e276fc73408799bc29f9a5d2e6c005a6e84704
child 679779 255f8ef02dcd9453efe0025ee2aef8b27770fe9c
child 679789 04a4ecce02875b80cd958a0edeedf4ded4437df1
child 679908 ca08beddf4186ad6d1e23362680dfe249ef16c32
child 680039 8e11d18d0b7683134ab5a07fc651028558355e01
child 680416 146858c8c768e66dd056cc9d28f75d567115e584
child 680640 e82ccfd8b158fd7a80cfebea32ddaa881bb6c40d
child 683240 e3edbc25423086e1371870b4073c5e8caf211162
child 685385 3063a67d65af380cb92705099727ccf14581669a
child 687440 5e0bb8be5f9cf6da5f53a75d6f67f9d05b10a4c2
child 687570 afdf00e2ea6b02a954f9d8fcb1952b2e88ed59c5
child 688569 e4dfa94215fc4ffff725af83931285db5aaf1eb5
child 691893 a1ea2da2725f3e049a085247f67e7bda4882c516
push id84141
push userbmo:schien@mozilla.com
push dateThu, 12 Oct 2017 11:13:04 +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)
 {