Closed
Bug 1773747
Opened 3 years ago
Closed 3 years ago
Detect lazy getter immediately used in the top-level script
Categories
(Developer Infrastructure :: Lint and Formatting, task)
Developer Infrastructure
Lint and Formatting
Tracking
(firefox103 fixed)
RESOLVED
FIXED
103 Branch
Tracking | Status | |
---|---|---|
firefox103 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(6 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
Bug 1773747 - Part 5: Do not use lazy getter for immediately-used symbol in XPIDatabase.jsm. r?kmag!
48 bytes,
text/x-phabricator-request
|
Details | Review |
If lazy getter is immediately used at the top-level script unconditionally, it doesn't have to be lazy getter.
const lazy = {};
XPCOMUtils.defineLazyModuleGetters(lazy, {
addDebuggerToGlobal: "resource://gre/modules/jsdebugger.jsm",
...
});
...
// Import the `Debugger` constructor in the current scope
lazy.addDebuggerToGlobal(globalThis);
Assignee | ||
Updated•3 years ago
|
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
the patch is based on bug 1771173
Updated•3 years ago
|
Attachment #9282183 -
Attachment description: WIP: Bug 1773747 - Add ESLint rule to check immediately-used lazy getter. r?Standard8! → Bug 1773747 - Add ESLint rule to check immediately-used lazy getter. r?Standard8!
Assignee | ||
Comment 4•3 years ago
|
||
Assignee | ||
Comment 5•3 years ago
|
||
Depends on D149986
Assignee | ||
Comment 6•3 years ago
|
||
Depends on D149987
Assignee | ||
Comment 7•3 years ago
|
||
Depends on D149988
Assignee | ||
Comment 8•3 years ago
|
||
Depends on D149989
Updated•3 years ago
|
Attachment #9282183 -
Attachment description: Bug 1773747 - Add ESLint rule to check immediately-used lazy getter. r?Standard8! → Bug 1773747 - Part 6: Add ESLint rule to check immediately-used lazy getter. r?Standard8!
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/3956d4c17fa6
Part 1: Do not use lazy getter for immediately-used symbol in browser/components/. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/8095b64db691
Part 2: Do not use lazy getter for immediately-used symbol in services/. r=markh
https://hg.mozilla.org/integration/autoland/rev/e179ce03de58
Part 3: Do not use lazy getter for immediately-used symbol in toolkit/components/nimbus/. r=barret
https://hg.mozilla.org/integration/autoland/rev/8b5616c36e0f
Part 4: Do not use lazy getter for immediately-used symbol in toolkit/components/search/. r=Standard8
https://hg.mozilla.org/integration/autoland/rev/ea025a943cb5
Part 5: Do not use lazy getter for immediately-used symbol in XPIDatabase.jsm. r=kmag
https://hg.mozilla.org/integration/autoland/rev/060cc066304c
Part 6: Add ESLint rule to check immediately-used lazy getter. r=Standard8
Comment 10•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3956d4c17fa6
https://hg.mozilla.org/mozilla-central/rev/8095b64db691
https://hg.mozilla.org/mozilla-central/rev/e179ce03de58
https://hg.mozilla.org/mozilla-central/rev/8b5616c36e0f
https://hg.mozilla.org/mozilla-central/rev/ea025a943cb5
https://hg.mozilla.org/mozilla-central/rev/060cc066304c
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
status-firefox103:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•