Backed out changeset: 10e8371749f9
authorSerge Gautherie <sgautherie.bz@free.fr>
Sat, 21 Mar 2009 01:32:55 +0100
changeset 26439 11d92035b807de4ffe510a14f9226de1c4743433
parent 26434 10e8371749f9d4e7f1444c313db6744333453c84
child 26440 49d7fee2e9b4579fc960cb9584b70a8ec8053fb2
push id6068
push usersgautherie.bz@free.fr
push dateSat, 21 Mar 2009 00:35:53 +0000
treeherdermozilla-central@49d7fee2e9b4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.2a1pre
Backed out changeset: 10e8371749f9 As dolske says this patch doesn't apply to tip (anymore) ! That's only the 3rd time I checkin-needed and back this very patch out after all :-(
toolkit/components/passwordmgr/src/storage-mozStorage.js
--- a/toolkit/components/passwordmgr/src/storage-mozStorage.js
+++ b/toolkit/components/passwordmgr/src/storage-mozStorage.js
@@ -1110,17 +1110,22 @@ LoginManagerStorage_mozStorage.prototype
      * Returns the wrapped statement for execution.  Will use memoization
      * so that statements can be reused.
      */
     _dbCreateStatement : function (query, params) {
         let wrappedStmt = this._dbStmts[query];
         // Memoize the statements
         if (!wrappedStmt) {
             this.log("Creating new statement for query: " + query);
-            this._dbStmts[query] = this._dbConnection.createStatement(query);
+            let stmt = this._dbConnection.createStatement(query);
+
+            wrappedStmt = Cc["@mozilla.org/storage/statement-wrapper;1"].
+                          createInstance(Ci.mozIStorageStatementWrapper);
+            wrappedStmt.initialize(stmt);
+            this._dbStmts[query] = wrappedStmt;
         }
         // Replace parameters, must be done 1 at a time
         if (params)
             for (let i in params)
                 wrappedStmt.params[i] = params[i];
         return wrappedStmt;
     },
 
@@ -1349,17 +1354,17 @@ LoginManagerStorage_mozStorage.prototype
         // Create backup file
         if (backup) {
             let backupFile = this._signonsFile.leafName + ".corrupt";
             this._storageService.backupDatabaseFile(this._signonsFile, backupFile);
         }
 
         // Finalize all statements to free memory, avoid errors later
         for (let i = 0; i < this._dbStmts.length; i++)
-            this._dbStmts[i].finalize();
+            this._dbStmts[i].statement.finalize();
         this._dbStmts = [];
 
         // Close the connection, ignore 'already closed' error
         try { this._dbConnection.close() } catch(e) {}
         this._signonsFile.remove(false);
     }
 
 }; // end of nsLoginManagerStorage_mozStorage implementation