From e5afd5acdcf1927126418d434b4e4599eef8915d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Fri, 25 Sep 2009 15:34:54 -0700 Subject: [PATCH] Bug 518418 - storage-mozStorage should use executeStep() instead of step(). r=dolske+sdwilsh --HG-- extra : rebase_source : 71540d949a7c8a7a8ff8fa44d77d0048a4bca92f --- .../components/passwordmgr/src/storage-mozStorage.js | 12 ++++++------ .../test/unit/test_storage_mozStorage_3.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/toolkit/components/passwordmgr/src/storage-mozStorage.js b/toolkit/components/passwordmgr/src/storage-mozStorage.js index f2222bff5ed8..6fec2fe590de 100644 --- a/toolkit/components/passwordmgr/src/storage-mozStorage.js +++ b/toolkit/components/passwordmgr/src/storage-mozStorage.js @@ -601,7 +601,7 @@ LoginManagerStorage_mozStorage.prototype = { try { stmt = this._dbCreateStatement(query, params); // We can't execute as usual here, since we're iterating over rows - while (stmt.step()) { + while (stmt.executeStep()) { // Create the new nsLoginInfo object, push to array let login = Cc["@mozilla.org/login-manager/loginInfo;1"]. createInstance(Ci.nsILoginInfo); @@ -759,7 +759,7 @@ LoginManagerStorage_mozStorage.prototype = { let stmt, numLogins; try { stmt = this._dbCreateStatement(query, params); - stmt.step(); + stmt.executeStep(); numLogins = stmt.row.numLogins; } catch (e) { this.log("_countLogins failed: " + e.name + " : " + e.message); @@ -855,7 +855,7 @@ LoginManagerStorage_mozStorage.prototype = { let stmt; try { stmt = this._dbCreateStatement(query, params); - while (stmt.step()) + while (stmt.executeStep()) disabledHosts.push(stmt.row.hostname); } catch (e) { this.log("_queryDisabledHosts failed: " + e.name + " : " + e.message); @@ -978,7 +978,7 @@ LoginManagerStorage_mozStorage.prototype = { let stmt, numLogins; try { stmt = this._dbCreateStatement(query, params); - stmt.step(); + stmt.executeStep(); numLogins = stmt.row.numLogins; } catch (e) { this.log("_isGuidUnique failed: " + e.name + " : " + e.message); @@ -1410,7 +1410,7 @@ LoginManagerStorage_mozStorage.prototype = { let stmt; try { stmt = this._dbCreateStatement(query); - while (stmt.step()) + while (stmt.executeStep()) ids.push(stmt.row.id); } catch (e) { this.log("Failed getting IDs: " + e); @@ -1474,7 +1474,7 @@ LoginManagerStorage_mozStorage.prototype = { "FROM moz_logins WHERE encType isnull"; try { stmt = this._dbCreateStatement(query); - while (stmt.step()) { + while (stmt.executeStep()) { let params = { id: stmt.row.id }; if (stmt.row.encryptedUsername.charAt(0) == '~' || stmt.row.encryptedPassword.charAt(0) == '~') diff --git a/toolkit/components/passwordmgr/test/unit/test_storage_mozStorage_3.js b/toolkit/components/passwordmgr/test/unit/test_storage_mozStorage_3.js index 06a4b8bcb1da..07041ecfe631 100644 --- a/toolkit/components/passwordmgr/test/unit/test_storage_mozStorage_3.js +++ b/toolkit/components/passwordmgr/test/unit/test_storage_mozStorage_3.js @@ -20,7 +20,7 @@ var storage, testnum = 0; function countBase64Logins(conn) { let stmt = conn.createStatement("SELECT COUNT(1) as numBase64 FROM moz_logins " + "WHERE encType = " + ENCTYPE_BASE64); - do_check_true(stmt.step()); + do_check_true(stmt.executeStep()); let numBase64 = stmt.row.numBase64; stmt.finalize(); return numBase64;