Closed Bug 1566457 Opened 6 years ago Closed 6 years ago

Loaders summer cleanup

Categories

(DevTools :: Framework, enhancement)

enhancement
Not set
normal

Tracking

(firefox70 fixed)

RESOLVED FIXED
Firefox 70
Tracking Status
firefox70 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

Loader.jsm and base-loader are full of unused features / code branches which are far from being obvious.

These two modules could be shorter and slightly easier to process.
I'll attach here random patches doing quite random cleanups but mostly focusing on removing unused code.

Assignee: nobody → poirot.alex

The rest was legacy code to support old xul add-ons.
All mozilla-central code used to be refactored, but a few places
were still using the old codepaths.

We used to have another provider which would load module via file:// URI,
directly from the disk. But the progress on artifact builds and ./mach build faster
made this obsolete and has been removed a long time ago.
We still have a lot of abstraction to support this non-existent feature.

This was kept to support old xul addons. All mozilla-central usages
have been removed and now uses Loader.jsm to get access to this module.

Hi Mark,

In this patch series we are updating a few JSMs, do we need to update https://searchfox.org/mozilla-central/source/tools/lint/eslint/modules.json manually to reflect the changes?

Flags: needinfo?(standard8)

(In reply to Julian Descottes [:jdescottes] from comment #6)

In this patch series we are updating a few JSMs, do we need to update https://searchfox.org/mozilla-central/source/tools/lint/eslint/modules.json manually to reflect the changes?

Yes there's only manual changes to that file at the moment, although we were also hoping that with some of the moves towards es6 modules that might go away sometime.

For now, its manual changes, but you only need to list JSMs where there's more than one export, or the exported name is different from the filename.

Flags: needinfo?(standard8)

Thanks for the feedback!

Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d45b2bb978de Remove unused codepath in the base loader for non-shared globals. r=jdescottes https://hg.mozilla.org/integration/autoland/rev/a3d95f00472e Remove unused devtools-cleanup observer message. r=jdescottes https://hg.mozilla.org/integration/autoland/rev/271d26f3907e Only export require, loader and DevToolsLoader from Loader.jsm r=jdescottes https://hg.mozilla.org/integration/autoland/rev/84c2a0655cf3 Remove unused provider logic from Loader.jsm. r=jdescottes https://hg.mozilla.org/integration/autoland/rev/9ea86b530d01 Removed deprecated gDevTools JSM. r=jdescottes
Regressions: 1496626
Regressions: 1567695
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: