Closed
Bug 1738229
Opened 3 years ago
Closed 3 years ago
Stop using the second argument to ChromeUtils.import in various files in browser
Categories
(Firefox :: General, task, P3)
Firefox
General
Tracking
()
RESOLVED
FIXED
96 Branch
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: standard8, Assigned: raquelvargas, Mentored)
References
Details
(Keywords: good-first-bug, Whiteboard: [lang=js])
Attachments
(1 file)
Passing this
or null
as the second argument to ChromeUtils.import(..., null)
causes behaviour that we don't want now. As we look towards a new module system we need to prevent this behaviour.
I'm happy to mentor this. For instructions on how to get your local build of Firefox up and running and submit your patch, see https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Having an ESLint editor integration set-up is also useful.
What needs doing:
- Remove the 4 file references for this rule from the top-level .eslintrc.js
- Run
./mach eslint browser/
to see where the issues are. - For fixing the issues see notes below.
- Re-run ESLint and ensure issues are fixed. If there are issues about formatting you can re-run eslint with
--fix
to automatically fix those. - Now submit your patch.
For fixing the issues:
- Generally the second argument should be removed and you'll want to end up with something of the form:
let { SelectContentHelper } = ChromeUtils.import("resource://gre/actors/SelectChild.jsm");
- If the result of the call is not being assigned to something, check for ESLint reporting undefined variables when you remove the second argument, and use those as the variable name using the form above.
Please note this bug will be auto-assigned when the first patch is attached, though you are welcome to comment that you are working on it.
Reporter | ||
Updated•3 years ago
|
Severity: -- → N/A
Priority: -- → P3
Assignee | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
Assignee: nobody → raquelvargas
Status: NEW → ASSIGNED
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ed1595ec5b53 Stop using the second argument to ChromeUtils.import in various files in browser. r=Standard8,webcompat-reviewers,twisniewski
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
•