Closed Bug 577363 Opened 14 years ago Closed 14 years ago

assignment to undeclared variable stmt in _dbMigrateToVersion4

Categories

(Toolkit :: Password Manager, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

()

Details

Attachments

(1 file, 2 obsolete files)

assignment to undeclared variable stmt in _dbMigrateToVersion4

1422     _dbMigrateToVersion4 : function () {

1436         try {
1437             stmt = this._dbCreateStatement(query);
1438             while (stmt.executeStep())
1439                 ids.push(stmt.row.id);

1443         } finally {
1444             stmt.reset();

1456             try {
1457                 stmt = this._dbCreateStatement(query, params);
1458                 stmt.execute();

1462             } finally {
1463                 stmt.reset();
Attached patch patch (obsolete) — Splinter Review
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #456333 - Flags: review?(gavin.sharp)
Comment on attachment 456333 [details] [diff] [review]
patch

js> (function () { try { let foo = 2; } catch (ex) {} finally { print(foo); } })()
typein:1: ReferenceError: foo is not defined
Attachment #456333 - Flags: review?(gavin.sharp) → review-
Just add |let stmt;| near the top of the function (matching the style elsewhere in this file).
Attached patch patch (obsolete) — Splinter Review
Attachment #456333 - Attachment is obsolete: true
Attachment #456357 - Flags: review?(gavin.sharp)
Component: Storage → Password Manager
QA Contact: storage → password.manager
Comment on attachment 456357 [details] [diff] [review]
patch

Do you want to fix _dbMigrateToVersion3 too while you're here?
Comment on attachment 456357 [details] [diff] [review]
patch

Since I know you're going to do it, r=zpao with the additional change in _dbMigrateToVersion3
Attachment #456357 - Flags: review?(gavin.sharp) → review+
Attachment #456357 - Attachment is obsolete: true
Attachment #456425 - Flags: review+
http://hg.mozilla.org/mozilla-central/rev/4cd68d278fd2
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: