Closed
Bug 1738310
Opened 3 years ago
Closed 3 years ago
Some minor code improvements for aboutLogin components
Categories
(Firefox :: about:logins, task, P3)
Firefox
about:logins
Tracking
()
RESOLVED
FIXED
96 Branch
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: dimi, Assigned: tgiles)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
I took a quick look around aboutLoginChild/aboutLoginParent/aboutLoginsUtils to see if I have any idea what refactoring work could be done, unfortunately, I don't have any good idea at this moment.
However, the are some quite minor coding style changes we can do
- aboutLoginChild.jsm
- The naming of the message can be changed to match the function name to better reflect its real usage
https://searchfox.org/mozilla-central/rev/a9e0a3f5e5f7cde941d419db967997aaa1f06b0f/browser/components/aboutlogins/AboutLoginsChild.jsm#211-225 - add 'g' prefix to the global variable
https://searchfox.org/mozilla-central/rev/a9e0a3f5e5f7cde941d419db967997aaa1f06b0f/browser/components/aboutlogins/AboutLoginsChild.jsm#33-35
- The naming of the message can be changed to match the function name to better reflect its real usage
- aboutLoginParent.jsm
- add 'g' prefix to the variable and give it a default value.
https://searchfox.org/mozilla-central/rev/a9e0a3f5e5f7cde941d419db967997aaa1f06b0f/browser/components/aboutlogins/AboutLoginsParent.jsm#68 - move the magic const value to the top of the file like the other const variables for readibility
https://searchfox.org/mozilla-central/rev/a9e0a3f5e5f7cde941d419db967997aaa1f06b0f/browser/components/aboutlogins/AboutLoginsParent.jsm#229
- add 'g' prefix to the variable and give it a default value.
- aboutLoginsUtils.js
- use optional chaining to simplify the expressions
https://searchfox.org/mozilla-central/rev/a9e0a3f5e5f7cde941d419db967997aaa1f06b0f/browser/components/aboutlogins/content/aboutLoginsUtils.js#32
- use optional chaining to simplify the expressions
Assignee | ||
Updated•3 years ago
|
Assignee: nobody → tgiles
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•3 years ago
|
||
Pushed by sgalich@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7d06d7c8f16d Refactor parts of aboutlogins to be more understandable. r=sgalich
Comment 3•3 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
status-firefox96:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•