diff --git a/toolkit/components/places/src/nsPlacesDBFlush.js b/toolkit/components/places/src/nsPlacesDBFlush.js index b1a1659762d4..1d0c3cfd98c5 100644 --- a/toolkit/components/places/src/nsPlacesDBFlush.js +++ b/toolkit/components/places/src/nsPlacesDBFlush.js @@ -179,7 +179,7 @@ nsPlacesDBFlush.prototype = { // Close the database connection, this was the last sync and we can't // ensure database coherence from now on. this._self._finalizeInternalStatements(); - this._self._db.asyncClose(); + this._self._db.close(); } }, Ci.nsIThread.DISPATCH_NORMAL); } diff --git a/toolkit/components/places/tests/sync/test_database_sync_after_shutdown_with_removeAllPages.js b/toolkit/components/places/tests/sync/test_database_sync_after_shutdown_with_removeAllPages.js index d0cc6934fcfb..bfa202a041ca 100644 --- a/toolkit/components/places/tests/sync/test_database_sync_after_shutdown_with_removeAllPages.js +++ b/toolkit/components/places/tests/sync/test_database_sync_after_shutdown_with_removeAllPages.js @@ -139,11 +139,10 @@ function check_results() { do_check_false(stmt.executeStep()); stmt.finalize(); - dbConn.asyncClose(function() { - do_check_false(dbConn.connectionReady); + dbConn.close(); + do_check_false(dbConn.connectionReady); - do_test_finished(); - }); + do_test_finished(); } function run_test()