[tbb-commits] [tor-browser/esr24] Bug 965982. r=bent, a=lsblakk

mikeperry at torproject.org mikeperry at torproject.org
Fri Aug 29 05:26:37 UTC 2014


commit efbbb3a73c0f4325f2a41a6b42d6ddc4e1f670fc
Author: Jan Varga <jan.varga at gmail.com>
Date:   Fri Jan 31 09:50:15 2014 -0800

    Bug 965982. r=bent, a=lsblakk
---
 dom/quota/QuotaManager.cpp |   32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/dom/quota/QuotaManager.cpp b/dom/quota/QuotaManager.cpp
index ca62e79..fd2e6bc 100644
--- a/dom/quota/QuotaManager.cpp
+++ b/dom/quota/QuotaManager.cpp
@@ -1233,22 +1233,6 @@ QuotaManager::Observe(nsISupports* aSubject,
         }
       }
 
-      // Give clients a chance to cleanup IO thread only objects.
-      nsCOMPtr<nsIRunnable> runnable =
-        NS_NewRunnableMethod(this, &QuotaManager::ReleaseIOThreadObjects);
-      if (!runnable) {
-        NS_WARNING("Failed to create runnable!");
-      }
-
-      if (NS_FAILED(mIOThread->Dispatch(runnable, NS_DISPATCH_NORMAL))) {
-        NS_WARNING("Failed to dispatch runnable!");
-      }
-
-      // Make sure to join with our IO thread.
-      if (NS_FAILED(mIOThread->Shutdown())) {
-        NS_WARNING("Failed to shutdown IO thread!");
-      }
-
       // Kick off the shutdown timer.
       if (NS_FAILED(mShutdownTimer->Init(this, DEFAULT_SHUTDOWN_TIMER_MS,
                                          nsITimer::TYPE_ONE_SHOT))) {
@@ -1265,6 +1249,22 @@ QuotaManager::Observe(nsISupports* aSubject,
       if (NS_FAILED(mShutdownTimer->Cancel())) {
         NS_WARNING("Failed to cancel shutdown timer!");
       }
+
+      // Give clients a chance to cleanup IO thread only objects.
+      nsCOMPtr<nsIRunnable> runnable =
+        NS_NewRunnableMethod(this, &QuotaManager::ReleaseIOThreadObjects);
+      if (!runnable) {
+        NS_WARNING("Failed to create runnable!");
+      }
+
+      if (NS_FAILED(mIOThread->Dispatch(runnable, NS_DISPATCH_NORMAL))) {
+        NS_WARNING("Failed to dispatch runnable!");
+      }
+
+      // Make sure to join with our IO thread.
+      if (NS_FAILED(mIOThread->Shutdown())) {
+        NS_WARNING("Failed to shutdown IO thread!");
+      }
     }
 
     return NS_OK;





More information about the tbb-commits mailing list