Closed Bug 2080403 Opened 1 month ago Closed 11 days ago

Load `tabnote-menu`, `split-view-footer`, `tabgroup-menu` and `drag-and-drop` .mjs as actual modules rather than sub scripts

Categories

(Firefox :: Tabbed Browser, task)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: dao, Assigned: dao)

References

(Blocks 1 open bug)

Details

Attachments

(2 external files)

Bug 2080275, bug 2080288, bug 2080287 and bug 2080286 rename tabnote-menu, split-view-footer, tabgroup-menu and drag-and-drop to .mjs while browser-main.js still loads them with loadSubScript. Each wraps its code in a block, which has to go before the file can export anything, and removing it reindents the whole file. This bug removes the four blocks and loads the files with ChromeUtils.importESModule and { global: "current" } in one commit, so .git-blame-ignore-revs and .hg-annotate-ignore-revs need a single entry.

Dropping each block, exporting the class and loading the file with importESModule can't be split: once a block is gone, the loadSubScript line hands the file's own top-level names back to it as globals. git diff -w shows the actual change, plus lines prettier re-joined.

split-view-footer.mjs reads the window's BrowserUtils, which utilityOverlay.js defines from the same module, because this is undefined at a module's top level. tabs.mjs imports TabDragAndDrop, which loads drag-and-drop.mjs, so browser-main.js no longer loads it.

Assignee: nobody → dao+bmo
Attachment #9657191 - Attachment description: WIP: Bug 2080403 - Load the tabbrowser window scripts renamed to .mjs as modules. r?#tabbrowser-reviewers → Bug 2080403 - Load the tabbrowser window scripts renamed to .mjs as modules. r?#tabbrowser-reviewers
Status: NEW → ASSIGNED
Pushed by dgottwald@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/1505b2146651 https://hg.mozilla.org/integration/autoland/rev/0347c0679126 Load the tabbrowser window scripts renamed to .mjs as modules. r=tabbrowser-reviewers,kcochrane
Status: ASSIGNED → RESOLVED
Closed: 11 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
Pushed by dgottwald@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/7410be8e0f9d https://hg.mozilla.org/integration/autoland/rev/253a8612bfd9 Ignore the reindent of the four renamed tabbrowser window modules in blame and annotate. r=firefox-desktop-core-reviewers ,mak DONTBUILD
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: