Closed Bug 489026 Opened 16 years ago Closed 16 years ago

Strict Warning: assignment to undeclared variable logins

Categories

(Toolkit :: Password Manager, defect)

1.9.1 Branch
defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: zeniko, Assigned: zeniko)

References

Details

(Keywords: fixed1.9.1)

Attachments

(1 file, 1 obsolete file)

Warnung: assignment to undeclared variable logins Quelldatei: file:///C:/Programme/Mozilla%20Firefox/components/nsLoginManager.js Zeile: 1066 Bonus strict warning: Warnung: reference to undefined property form.elements[i].type Quelldatei: file:///C:/Programme/Mozilla%20Firefox/components/nsLoginManager.js Zeile: 643
Attached patch fixes (obsolete) — Splinter Review
Looks like we leak one variable to the global scope; and (at least) HTMLFieldSetElement elements are considered form elements but don't have a "type" attribute.
Assignee: nobody → zeniko
Attachment #373514 - Flags: review?(dolske)
Comment on attachment 373514 [details] [diff] [review] fixes >- if (form.elements[i].type != "password") >+ if (!(form.elements[i] instanceof Ci.nsIDOMHTMLInputElement) || >+ form.elements[i].type != "password") { Boo. Stupid HTML. It makes me sad to do this, but guess it removes any ambiguity over having something that isn't a <input type="password"> slip through. But this now means there are 4 uses of form.elements[i] in the loop. Add a "var element = form.elements[i];" to the top of the loop and fix up the rest to use |element|. r+ with that.
Attachment #373514 - Flags: review?(dolske) → review+
Attached patch for check-inSplinter Review
Attachment #373514 - Attachment is obsolete: true
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Attachment #373519 - Flags: approval1.9.1?
Comment on attachment 373519 [details] [diff] [review] for check-in a191=beltzner
Attachment #373519 - Flags: approval1.9.1? → approval1.9.1+
Keywords: checkin-needed
This checkin was in a range identified with a Ts Shutdown regression on Windows: Regression: Ts Shutdown increase 27.64% on WINNT 5.1 Firefox3.5 Previous results: 357.263 from build 20090506145316 of revision 486b76052a94 at 2009-05-06 14:53:00 New results: 456.0 from build 20090506155401 of revision 7aa4483585bd at 2009-05-06 15:54:00 http://graphs-new.mozilla.org/graph.html#tests=[{"machine":32,"test":36,"branch":3},{"machine":33,"test":36,"branch":3},{"machine":34,"test":36,"branch":3},{"machine":35,"test":36,"branch":3},{"machine":48,"test":36,"branch":3}]&sel=1241564040,1241736840
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: