Bug 1091851 - Make sure that Places connections are closed timely;r=mak draft
authorDavid Rajchenbach-Teller <dteller@mozilla.com>
Wed, 03 Jun 2015 23:02:36 +0200
changeset 269706 0e97de85b043b1e6cf5332b2c872ed74f78eb8ab
parent 268846 f8d21278244bc0531513131f85a45e5736207ae1
child 506648 648eb9c3a37a113d78059be111234d0ec5764a46
push id2543
push userdteller@mozilla.com
push dateWed, 03 Jun 2015 21:02:50 +0000
reviewersmak
bugs1091851
milestone41.0a1
Bug 1091851 - Make sure that Places connections are closed timely;r=mak
toolkit/components/places/PlacesUtils.jsm
--- a/toolkit/components/places/PlacesUtils.jsm
+++ b/toolkit/components/places/PlacesUtils.jsm
@@ -2066,16 +2066,19 @@ XPCOMUtils.defineLazyGetter(this, "gAsyn
     Sqlite.cloneStorageConnection({
       connection: PlacesUtils.history.DBConnection,
       readOnly:   true
     }).then(conn => {
       try {
         Sqlite.shutdown.addBlocker(
           "PlacesUtils read-only connection closing",
           conn.close.bind(conn));
+        PlacesUtils.history.shutdownClient.jsclient.addBlocker(
+          "PlacesUtils read-only connection closing",
+          conn.close.bind(conn));
       } catch(ex) {
         // It's too late to block shutdown, just close the connection.
         conn.close();
         throw ex;
       }
       resolve(conn);
     });
   })