Merge m-c to b2ginbound, a=merge CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Tue, 13 Oct 2015 12:51:59 -0700
changeset 267449 83ab506fbe439c6f2e7588c9e0d63e09f1606ba5
parent 267448 2bd66074e01a40d30016a28b53b2926a4368f5fe (current diff)
parent 267411 2387ada864282880d3a498d643abe3d8b887ee59 (diff)
child 267450 6acb1fd7efdae2a21552402c3fff7d6eb4d3541d
push id29519
push usercbook@mozilla.com
push dateWed, 14 Oct 2015 10:29:57 +0000
treeherdermozilla-central@6307530f9f1e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone44.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
Merge m-c to b2ginbound, a=merge CLOSED TREE
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -20125,23 +20125,19 @@ FactoryOp::DirectoryLockFailed()
 
 void
 FactoryOp::ActorDestroy(ActorDestroyReason aWhy)
 {
   AssertIsOnBackgroundThread();
 
   NoteActorDestroyed();
 
-  // There may be an event in the event queue that would do the cleanup later,
-  // but if we are being destroyed abnormally (not by calling
-  // PBackgroundIDBFactoryRequestParent::Send__delete__) we need to do the
-  // cleanup here and just ignore the cleanup event in FactoryOp::Run.
-  // Otherwise some Database objects may be still alive and registered in
-  // gLiveDatabaseHashtable at the time the last factory is destroyed.
-  if (aWhy != Deletion) {
+  if (mState == State::WaitingForTransactionsToComplete ||
+      (mState == State::SendingResults && aWhy != Deletion)) {
+    // We didn't get an opportunity to clean up.  Do that now.
     mState = State::SendingResults;
     IDB_REPORT_INTERNAL_ERR();
     mResultCode = NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
     SendResults();
   }
 }
 
 bool