Bug 813833 - Part 2: Add additional logging around connection close; r=trivial
authorGregory Szorc <gps@mozilla.com>
Sun, 06 Jan 2013 21:26:49 -0800
changeset 117853 c5171c231bf486f5c6f27112e815f77bff2fa863
parent 117852 967ca515b01226cd9f5e4bb635176f5b311d17e1
child 117854 894790d8efe4868b850158198e995f790e7b90ae
push id24116
push usergszorc@mozilla.com
push dateMon, 07 Jan 2013 08:22:48 +0000
treeherdermozilla-central@66d595814554 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstrivial
bugs813833
milestone20.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 813833 - Part 2: Add additional logging around connection close; r=trivial
toolkit/modules/Sqlite.jsm
--- a/toolkit/modules/Sqlite.jsm
+++ b/toolkit/modules/Sqlite.jsm
@@ -244,16 +244,18 @@ OpenedConnection.prototype = Object.free
    *
    * @return Promise<>
    */
   close: function () {
     if (!this._connection) {
       return Promise.resolve();
     }
 
+    this._log.debug("Closing.");
+
     // Abort in-progress transaction.
     if (this._inProgressTransaction) {
       this._log.warn("Transaction in progress at time of close.");
       try {
         this._connection.rollbackTransaction();
       } catch (ex) {
         this._log.warn("Error rolling back transaction: " +
                        CommonUtils.exceptionStr(ex));
@@ -280,16 +282,17 @@ OpenedConnection.prototype = Object.free
     this._cachedStatements.clear();
 
     // This guards against operations performed between the call to this
     // function and asyncClose() finishing. See also bug 726990.
     this._open = false;
 
     let deferred = Promise.defer();
 
+    this._log.debug("Calling asyncClose().");
     this._connection.asyncClose({
       complete: function () {
         this._log.info("Closed");
         this._connection = null;
         deferred.resolve();
       }.bind(this),
     });