Closed Bug 443183 Opened 16 years ago Closed 16 years ago

<nsLoginManager.js>, |_fillForm()|: optimize/remove |var isFormDisabled|

Categories

(Toolkit :: Password Manager, defect)

defect
Not set
trivial

Tracking

()

RESOLVED WONTFIX
mozilla1.9.1a1

People

(Reporter: sgautherie, Assigned: sgautherie)

References

Details

Attachments

(1 file, 1 obsolete file)

(Noticed while looking into bug 425145.)
Attached patch (Av1) <nsLoginManager.js> (obsolete) (deleted) — Splinter Review
*The code optimization.
*1 comment addition.
*Blank line removals.
Assignee: nobody → sgautherie.bz
Status: NEW → ASSIGNED
Attachment #327809 - Flags: review?(gavin.sharp)
Depends on: 362576
Comment on attachment 327809 [details] [diff] [review]
(Av1) <nsLoginManager.js>

Oh, well: just noticed that  mozilla-central has (2) new (related) checkins...
Attachment #327809 - Attachment is obsolete: true
Attachment #327809 - Flags: review?(gavin.sharp)
The optimization is no longer relevant on trunk, and I don't think there's good reason to take this on branch.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → WONTFIX
Attached patch (Av2) <nsLoginManager.js> (deleted) — Splinter Review
Av1, with comment 2 suggestion(s). [Unified diff; no(t) Hg.]

Do we really need |this.log("form not filled, has autocomplete=off");| ?
Otherwise, that code could be optimized too.
Attachment #327905 - Flags: review?(dolske)
Status: RESOLVED → REOPENED
Depends on: 359675, 439365
Resolution: WONTFIX → ---
Summary: <nsLoginManager.js>, |_fillDocument()|: optimize/remove |var isFormDisabled|. → <nsLoginManager.js>, |_fillForm()|: optimize/remove |var isFormDisabled|
Status: REOPENED → ASSIGNED
Comment on attachment 327905 [details] [diff] [review]
(Av2) <nsLoginManager.js>

I don't see the point of this.
Attachment #327905 - Flags: review?(dolske) → review-
(In reply to comment #5)
> (From update of attachment 327905 [details] [diff] [review])
> I don't see the point of this.

Isn't it easier to read/execute ?
No, I don't think so. You've added an early return, shuffled the logic, and made a large pile of unneeded whitespace changes.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → WONTFIX
(In reply to comment #7)
> No, I don't think so. You've added an early return, shuffled the logic, and
> made a large pile of unneeded whitespace changes.

Reading a test once instead of three times is easier to me, at least.
Early return: yes, that's the point !
Which logic did I shuffle ?
Blank line removals shouldn't bother anything...

If you prefer, I can:
*use an |if (selectedLogin) { ... }|.
*leave the blank lines as they are.
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: