Bug 1174768 Cache should check if QuotaManager is shutting down before calling GetOrCreate. r=janv
authorBen Kelly <ben@wanderview.com>
Tue, 16 Jun 2015 12:00:55 -0700
changeset 279981 1659c5b4e48dfa990bb9d04f39147691f48715f1
parent 279980 f46a712edf7ee9088854b220661df6857453f69c
child 279982 834ad47007f21a7ac2138eccfea9639bc15e7d31
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjanv
bugs1174768
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1174768 Cache should check if QuotaManager is shutting down before calling GetOrCreate. r=janv
dom/cache/Context.cpp
--- a/dom/cache/Context.cpp
+++ b/dom/cache/Context.cpp
@@ -304,17 +304,17 @@ Context::QuotaInitRunnable::Run()
   nsRefPtr<SyncResolver> resolver = new SyncResolver();
 
   switch(mState) {
     // -----------------------------------
     case STATE_CALL_WAIT_FOR_OPEN_ALLOWED:
     {
       MOZ_ASSERT(NS_IsMainThread());
 
-      if (mCanceled) {
+      if (mCanceled || QuotaManager::IsShuttingDown()) {
         resolver->Resolve(NS_ERROR_ABORT);
         break;
       }
 
       QuotaManager* qm = QuotaManager::GetOrCreate();
       if (!qm) {
         resolver->Resolve(NS_ERROR_FAILURE);
         break;