Closed Bug 1608272 Opened 5 years ago Closed 4 years ago

Ban the use of passing this as the second argument to ChromeUtils.import

Categories

(Firefox :: General, task, P5)

task

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: mossop, Assigned: standard8)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Callers should instead destructure the results of the import.

I seem to have accidentally got sidetracked and have the majority of a patch for this.

Assignee: nobody → standard8
Status: NEW → ASSIGNED

I think my plan for this would be to land it after the code freeze for 87, i.e. at the start of 88. Although there's unlikely to be issues, I think landing at the start of a cycle is better for something like this.

Attachment #9202313 - Attachment description: Bug 1608272 - ESLint automatic fixes to remove 'this' as the second argument of ChromeUtils.import. → Bug 1608272 - Remove 'this' as the second argument to 'ChromeUtils.import', use object destructuring instead (test-only changes). r?Gijs
Attachment #9202315 - Attachment description: Bug 1608272 - Manual fixes to remove 'this' as the second argument of ChromeUtils.import. → Bug 1608272 - Remove 'this' as the second argument to 'ChromeUtils.import', use object destructuring instead (application changes). r?Gijs
Blocks: 1692217
Attachment #9202313 - Attachment description: Bug 1608272 - Remove 'this' as the second argument to 'ChromeUtils.import', use object destructuring instead (test-only changes). r?Gijs → Bug 1608272 - Remove 'this' as the second argument to 'ChromeUtils.import', use object destructuring instead (test-only changes). r?Gijs!
Attachment #9202315 - Attachment description: Bug 1608272 - Remove 'this' as the second argument to 'ChromeUtils.import', use object destructuring instead (application changes). r?Gijs → Bug 1608272 - Remove 'this' as the second argument to 'ChromeUtils.import', use object destructuring instead (application changes). r?Gijs!
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2d15ecc335a7 Remove 'this' as the second argument to 'ChromeUtils.import', use object destructuring instead (test-only changes). r=Gijs https://hg.mozilla.org/integration/autoland/rev/0248fb3e2f1c Remove 'this' as the second argument to 'ChromeUtils.import', use object destructuring instead (application changes). r=geckoview-reviewers,Gijs,agi https://hg.mozilla.org/integration/autoland/rev/e6e4ffe379f1 Extend an ESLint rule to disallow 'this' as the second argument to ChromeUtils.import. r=Gijs
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
Blocks: 1609271
No longer blocks: 1692217
Blocks: 1692217
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: