Bug 462206 - finalize statements in nsPlacesDBFlush, r=sdwilsh
authorMarco Bonardo <mak77@bonardo.net>
Thu, 30 Oct 2008 09:51:34 +0100
changeset 21088 03288ea8c289788ccac08094157e57e6ce6a05ef
parent 21087 5c7b0c34e603b76f1f1f11a5c238fdebddd8d405
child 21089 0e702acc89d97b11a3d7a7f199f7aa77515cc2f6
push id3300
push usermak77@bonardo.net
push dateThu, 30 Oct 2008 08:53:00 +0000
treeherdermozilla-central@03288ea8c289 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssdwilsh
bugs462206
milestone1.9.1b2pre
Bug 462206 - finalize statements in nsPlacesDBFlush, r=sdwilsh
toolkit/components/places/src/nsPlacesDBFlush.js
--- a/toolkit/components/places/src/nsPlacesDBFlush.js
+++ b/toolkit/components/places/src/nsPlacesDBFlush.js
@@ -196,16 +196,19 @@ nsPlacesDBFlush.prototype = {
       return;
 
     let statements = [];
     for (let i = 0; i < aTableNames.length; i++)
       statements.push(this._getSyncTableStatement(aTableNames[i]));
 
     // Execute sync statements async in a transaction
     this._db.executeAsync(statements, statements.length, this);
+
+    // Finalize statements, otherwise we could get in trouble
+    statements.forEach(function(stmt) stmt.finalize());
   },
 
   /**
    * Generate the statement to synchronizes the moz_{aTableName} and
    * moz_{aTableName}_temp by copying all the data from the temporary table
    * into the permanent one.
    * Most of the work is done through triggers defined in nsPlacesTriggers.h,
    * they sync back to disk, then delete the data in the temporary table.