Closed Bug 1531368 Opened 6 years ago Closed 3 years ago

Remove uses of ChromeUtils.import(..., null) in extensions code

Categories

(WebExtensions :: General, task, P3)

task

Tracking

(firefox95 fixed)

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: robwu, Assigned: mathew.hodson)

References

Details

Attachments

(1 file)

There are dozens of uses of ChromeUtils.import with null as the second parameter. This is deprecated, so we should move away from it.

https://searchfox.org/mozilla-central/search?q=ChromeUtils.import%5C(%22%5B%5E%22%5D%2B%22%2C+null%5C)%3B&case=false&regexp=true&path=extensions%2F

28 occurrences use Management, which can simply be replaced with ExtensionParent.apiManager. There are probably also a few other simple fixes, and some possibly more difficult cases.

Priority: -- → P2
Type: enhancement → task
Priority: P2 → P3
Blocks: 1609271

Simplify some instances where modules were lazy loaded.

Assignee: nobody → mathew.hodson
Status: NEW → ASSIGNED

Hi Mathew, are you still working on this? The other patch that I mentioned in Phabricator landed a while ago.

Flags: needinfo?(mathew.hodson)

I'm still planning to work on it. It might take me some time because I need to setup my environment and rebase.

Flags: needinfo?(mathew.hodson)

(In reply to Mathew Hodson from comment #3)

I'm still planning to work on it. It might take me some time because I need to setup my environment and rebase.

If you're looking for a written guide, see the section and/or linked documentation at https://wiki.mozilla.org/WebExtensions/Contribution_Onramp#Setting_Up_Developer_Environment

Just to note, I'm going to be filing bugs to fix the other import rule failures referenced in the .eslintrc.js file, so you may come across bitrot there.

Also, I've just been told that it would be useful to have this within the next few weeks, as we are hoping to move forward with work that this enables.

Depends on: 1733851
Depends on: 1733871
Depends on: 1733883
Depends on: 1733886
Attachment #9228484 - Attachment description: Bug 1531368 - Use ChromeUtils.import with one parameter in extensions code. r?robwu → Bug 1531368 - Use `ChromeUtils.import` with one parameter in extensions code. r?robwu
Pushed by rob@robwu.nl: https://hg.mozilla.org/integration/autoland/rev/d5698a41fbcc Use `ChromeUtils.import` with one parameter in extensions code. r=robwu
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch

Thank you for working on, that's a really nice big bit of clean-up to have done.

Severity: normal → --
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: