Bug 452899 - Don't explicitly create the statement wrapper - storage does it for us; (retry, after bug 457743 was fixed); r=(dolske + sdwilsh)

This commit is contained in:
Paul O'Shannessy 2008-12-04 18:41:44 +01:00
Родитель 0fa7e8eb39
Коммит f9ab78127c
1 изменённых файлов: 2 добавлений и 7 удалений

Просмотреть файл

@ -954,12 +954,7 @@ LoginManagerStorage_mozStorage.prototype = {
// Memoize the statements
if (!this._dbStmts[query]) {
this.log("Creating new statement for query: " + query);
let stmt = this._dbConnection.createStatement(query);
let wrappedStmt = Cc["@mozilla.org/storage/statement-wrapper;1"].
createInstance(Ci.mozIStorageStatementWrapper);
wrappedStmt.initialize(stmt);
this._dbStmts[query] = wrappedStmt;
this._dbStmts[query] = this._dbConnection.createStatement(query);
}
// Replace parameters, must be done 1 at a time
if (params)
@ -1082,7 +1077,7 @@ LoginManagerStorage_mozStorage.prototype = {
// Finalize all statements to free memory, avoid errors later
for (let i = 0; i < this._dbStmts.length; i++)
this._dbStmts[i].statement.finalize();
this._dbStmts[i].finalize();
this._dbStmts = [];
// Close the connection, ignore 'already closed' error