Convert toolkit/components/extensions to ES modules
Categories
(WebExtensions :: General, task, P3)
Tracking
(firefox115 fixed)
Tracking | Status | |
---|---|---|
firefox115 | --- | fixed |
People
(Reporter: standard8, Assigned: sairaabdullapa)
References
(Blocks 1 open bug)
Details
(Whiteboard: [esmification-timeline])
Attachments
(2 files)
As part of the ongoing work, we should convert toolkit/components/extensions
to ES modules.
I think this can be done without needing module workers (bug 1812591) but we should verify that is the case when the work is done if they haven't been enabled yet. There is a guide for the transition here.
Updated•2 years ago
|
Reporter | ||
Comment 2•2 years ago
|
||
(In reply to Saira from comment #1)
Can I work on this?
I can't see anything in this area of code that would cause a significant issue, though there may be something show up once you start working on it - we might have to be prepared to undo/redo some changes.
The other thing I would say is that the two commands ./mach esmify --convert ...
and ./mach esmify --import ...
would be best kept as separate commits - this is going to touch a lot of files, and so having two commits will make it easier to review.
Okay! I will keep that in mind and will be careful. Thank you!
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 7•2 years ago
•
|
||
Backed out for causing dt failures on browser_dbg-features-source-tree.js.
Also, before re-landing this, please take a look at this TV failure.
[task 2023-05-31T13:15:54.534Z] 13:15:54 INFO - TEST-PASS | devtools/client/debugger/test/mochitest/browser_dbg-features-source-tree.js | Expected text content on line 2 -
[task 2023-05-31T13:15:54.535Z] 13:15:54 INFO - The quickOpen key is pressed
[task 2023-05-31T13:15:54.536Z] 13:15:54 INFO - Buffered messages logged at 13:15:21
[task 2023-05-31T13:15:54.536Z] 13:15:54 INFO - Leaving test bound testSourceTreeOnTheIntegrationTestPage
[task 2023-05-31T13:15:54.537Z] 13:15:54 INFO - Entering test bound testSourceTreeWithWebExtensionContentScript
[task 2023-05-31T13:15:54.538Z] 13:15:54 INFO - Extension loaded
[task 2023-05-31T13:15:54.541Z] 13:15:54 INFO - Buffered messages logged at 13:15:24
[task 2023-05-31T13:15:54.541Z] 13:15:54 INFO - Console message: [JavaScript Error: "NotFoundError: No such JSWindowActor 'DevToolsFrame'"]
[task 2023-05-31T13:15:54.543Z] 13:15:54 INFO - Console message: [JavaScript Error: "NotFoundError: No such JSWindowActor 'DevToolsFrame'"]
[task 2023-05-31T13:15:54.544Z] 13:15:54 INFO - Without the chrome preference, the content script doesn't show up
[task 2023-05-31T13:15:54.544Z] 13:15:54 INFO - Adding a new tab with URL: https://example.com/browser/devtools/client/debugger/test/mochitest/examples/doc-content-script-sources.html
[task 2023-05-31T13:15:54.545Z] 13:15:54 INFO - Buffered messages logged at 13:15:25
[task 2023-05-31T13:15:54.545Z] 13:15:54 INFO - Tab added and finished loading
[task 2023-05-31T13:15:54.551Z] 13:15:54 INFO - Opening the toolbox
[task 2023-05-31T13:15:54.552Z] 13:15:54 INFO - Console message: Invalid chrome URI (need path): chrome://devtools/
[task 2023-05-31T13:15:54.553Z] 13:15:54 INFO - Console message: [JavaScript Error: "Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“default-src”)." {file: "chrome://global/content/customElements.js" line: 499 column: 24 source: "display: none !important"}]
[task 2023-05-31T13:15:54.579Z] 13:15:54 INFO - Console message: [JavaScript Error: "Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“default-src”)." {file: "chrome://global/content/customElements.js" line: 499}]
[task 2023-05-31T13:15:54.581Z] 13:15:54 INFO - Console message: [JavaScript Error: "Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“default-src”)." {file: "chrome://global/content/elements/panel.js" line: 62}]
[task 2023-05-31T13:15:54.582Z] 13:15:54 INFO - Buffered messages logged at 13:15:26
[task 2023-05-31T13:15:54.585Z] 13:15:54 INFO - Console message: [JavaScript Error: "Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“default-src”)." {file: "chrome://global/content/customElements.js" line: 499 column: 24 source: "display: none !important"}]
[task 2023-05-31T13:15:54.586Z] 13:15:54 INFO - Console message: [JavaScript Error: "Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“default-src”)." {file: "chrome://global/content/customElements.js" line: 499}]
[task 2023-05-31T13:15:54.594Z] 13:15:54 INFO - Console message: [JavaScript Error: "Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“default-src”)." {file: "chrome://global/content/elements/panel.js" line: 62}]
[task 2023-05-31T13:15:54.601Z] 13:15:54 INFO - Toolbox opened and focused
[task 2023-05-31T13:15:54.601Z] 13:15:54 INFO - Waiting 1 seconds.
[task 2023-05-31T13:15:54.602Z] 13:15:54 INFO - Buffered messages logged at 13:15:27
[task 2023-05-31T13:15:54.602Z] 13:15:54 INFO - waiting for 0 files in the source tree
[task 2023-05-31T13:15:54.604Z] 13:15:54 INFO - Buffered messages finished
[task 2023-05-31T13:15:54.605Z] 13:15:54 INFO - TEST-UNEXPECTED-FAIL | devtools/client/debugger/test/mochitest/browser_dbg-features-source-tree.js | Uncaught exception in test bound testSourceTreeWithWebExtensionContentScript - at chrome://mochitests/content/browser/devtools/client/debugger/test/mochitest/shared-head.js:2349 - Error: Invalid Source Tree Content.
[task 2023-05-31T13:15:54.606Z] 13:15:54 INFO - Unexpected elements: ExtensionContent.sys.mjs
[task 2023-05-31T13:15:54.606Z] 13:15:54 INFO - Stack trace:
[task 2023-05-31T13:15:54.606Z] 13:15:54 INFO - waitForSourcesInSourceTree@chrome://mochitests/content/browser/devtools/client/debugger/test/mochitest/shared-head.js:2349:11
[task 2023-05-31T13:15:54.607Z] 13:15:54 INFO - async*testSourceTreeWithWebExtensionContentScript@chrome://mochitests/content/browser/devtools/client/debugger/test/mochitest/browser_dbg-features-source-tree.js:444:9
[task 2023-05-31T13:15:54.607Z] 13:15:54 INFO - async*handleTask@chrome://mochikit/content/browser-test.js:1133:26
[task 2023-05-31T13:15:54.607Z] 13:15:54 INFO - _runTaskBasedTest@chrome://mochikit/content/browser-test.js:1205:18
[task 2023-05-31T13:15:54.608Z] 13:15:54 INFO - async*Tester_execTest@chrome://mochikit/content/browser-test.js:1347:14
[task 2023-05-31T13:15:54.608Z] 13:15:54 INFO - nextTest/<@chrome://mochikit/content/browser-test.js:1122:14
[task 2023-05-31T13:15:54.609Z] 13:15:54 INFO - SimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1056:13
[task 2023-05-31T13:15:54.615Z] 13:15:54 INFO - Leaving test bound testSourceTreeWithWebExtensionContentScript
[task 2023-05-31T13:15:54.616Z] 13:15:54 INFO - Entering test bound testSourceTreeWithEncodedPaths
[task 2023-05-31T13:15:54.619Z] 13:15:54 INFO - Adding a new tab with URL: http://localhost:42596/index.html
[task 2023-05-31T13:15:54.619Z] 13:15:54 INFO - GECKO(1579) | ### XPCOM_MEM_BLOAT_LOG defined -- logging bloat/leaks to /tmp/tmpslegudk1.mozrunner/runtests_leaks_tab_pid9258.log
[task 2023-05-31T13:15:54.620Z] 13:15:54 INFO - GECKO(1579) | [9258, Main Thread] WARNING: XPCOM_MEM_BLOAT_LOG is set, disabling native allocations.: file /builds/worker/checkouts/gecko/tools/profiler/core/platform.cpp:345
[task 2023-05-31T13:15:54.621Z] 13:15:54 INFO - GECKO(1579) | [Child 9258, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/toolkit/xre/nsXREDirProvider.cpp:475
[task 2023-05-31T13:15:54.629Z] 13:15:54 INFO - GECKO(1579) | [Child 9258, Main Thread] WARNING: could not set real-time limit in CubebUtils::InitLibrary: file /builds/worker/checkouts/gecko/dom/media/CubebUtils.cpp:655
[task 2023-05-31T13:15:54.634Z] 13:15:54 INFO - GECKO(1579) | [Child 9258, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/toolkit/xre/nsXREDirProvider.cpp:475
[task 2023-05-31T13:15:54.640Z] 13:15:54 INFO - GECKO(1579) | [Child 9258, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/toolkit/xre/nsXREDirProvider.cpp:475
[task 2023-05-31T13:15:54.710Z] 13:15:54 INFO - GECKO(1579) | [Child 9258: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 7f4df8633400 == 1 [pid = 9258] [id = 0]
[task 2023-05-31T13:15:54.711Z] 13:15:54 INFO - GECKO(1579) | [Child 9258: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 1 (7f4e162f4090) [pid = 9258] [serial = 1] [outer = 0]
[task 2023-05-31T13:15:54.714Z] 13:15:54 INFO - GECKO(1579) | [Child 9258: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 2 (7f4df8633c00) [pid = 9258] [serial = 2] [outer = 7f4e162f4090]
[task 2023-05-31T13:15:54.771Z] 13:15:54 INFO - GECKO(1579) | [Parent 1579, Main Thread] WARNING: NS_ENSURE_TRUE(LoadIsPending()) failed: file /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:5807
[task 2023-05-31T13:15:54.828Z] 13:15:54 INFO - GECKO(1579) | [Child 9258, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/toolkit/xre/nsXREDirProvider.cpp:475
[task 2023-05-31T13:15:54.900Z] 13:15:54 INFO - GECKO(1579) | [Parent 1579, Main Thread] WARNING: NS_ENSURE_TRUE(mSuspendCount > 0) failed: file /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:5832
[task 2023-05-31T13:15:54.909Z] 13:15:54 INFO - GECKO(1579) | [Child 9258: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 3 (7f4df8637000) [pid = 9258] [serial = 3] [outer = 7f4e162f4090]
[task 2023-05-31T13:15:55.308Z] 13:15:55 INFO - GECKO(1579) | console.error: (new Error("Unexpected content-type \"text/plain;charset=US-ASCII\"", "resource://services-settings/Utils.sys.mjs", 399))
[task 2023-05-31T13:15:55.313Z] 13:15:55 INFO - GECKO(1579) | console.error: Translations: (new Error("Unable to retrieve the translation models.", "resource://gre/actors/TranslationsParent.sys.mjs", 887))
[task 2023-05-31T13:15:55.329Z] 13:15:55 INFO - Tab added and finished loading
[task 2023-05-31T13:15:55.330Z] 13:15:55 INFO - Opening the toolbox
[task 2023-05-31T13:15:55.355Z] 13:15:55 INFO - GECKO(1579) | [Parent 1579: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 7f96c51e3400 == 8 [pid = 1579] [id = 198]
[task 2023-05-31T13:15:55.356Z] 13:15:55 INFO - GECKO(1579) | [Parent 1579: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 27 (7f95c7467660) [pid = 1579] [serial = 489] [outer = 0]
[task 2023-05-31T13:15:55.357Z] 13:15:55 INFO - GECKO(1579) | [Parent 1579: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 28 (7f96c51e3800) [pid = 1579] [serial = 490] [outer = 7f95c7467660]
[task 2023-05-31T13:15:55.435Z] 13:15:55 INFO - GECKO(1579) | [Parent 1579: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 29 (7f96c51aa400) [pid = 1579] [serial = 491] [outer = 7f95c7467660]
[task 2023-05-31T13:15:55.777Z] 13:15:55 INFO - GECKO(1579) | [Parent 1579: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 7f96c93f3000 == 9 [pid = 1579] [id = 199]
[task 2023-05-31T13:15:55.777Z] 13:15:55 INFO - GECKO(1579) | [Parent 1579: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 30 (7f96b4107090) [pid = 1579] [serial = 492] [outer = 0]
[task 2023-05-31T13:15:55.779Z] 13:15:55 INFO - GECKO(1579) | [Parent 1579: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 31 (7f96c93ecc00) [pid = 1579] [serial = 493] [outer = 7f96b4107090]
[task 2023-05-31T13:15:55.792Z] 13:15:55 INFO - GECKO(1579) | [Parent 1579, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/chrome/nsChromeRegistry.cpp:182
[task 2023-05-31T13:15:55.793Z] 13:15:55 INFO - GECKO(1579) | [Parent 1579, Main Thread] WARNING: 'NS_FAILED(rv)', file /builds/worker/checkouts/gecko/chrome/nsChromeProtocolHandler.cpp:73
[task 2023-05-31T13:15:55.889Z] 13:15:55 INFO - Console message: Invalid chrome URI (need path): chrome://devtools/
[task 2023-05-31T13:15:55.979Z] 13:15:55 INFO - Console message: [JavaScript Error: "Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“default-src”)." {file: "chrome://global/content/customElements.js" line: 499 column: 24 source: "display: none !important"}]
[task 2023-05-31T13:15:55.981Z] 13:15:55 INFO - Console message: [JavaScript Error: "Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“default-src”)." {file: "chrome://global/content/customElements.js" line: 499}]
[task 2023-05-31T13:15:55.983Z] 13:15:55 INFO - Console message: [JavaScript Error: "Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“default-src”)." {file: "chrome://global/content/elements/panel.js" line: 62}]
[task 2023-05-31T13:15:56.019Z] 13:15:56 INFO - GECKO(1579) | [Parent 1579, Main Thread] WARNING: Failed to retarget HTML data delivery to the parser thread.: file /builds/worker/checkouts/gecko/parser/html/nsHtml5StreamParser.cpp:1235
[task 2023-05-31T13:15:56.934Z] 13:15:56 INFO - Console message: [JavaScript Error: "Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“default-src”)." {file: "chrome://global/content/customElements.js" line: 499 column: 24 source: "display: none !important"}]
[task 2023-05-31T13:15:56.938Z] 13:15:56 INFO - Console message: [JavaScript Error: "Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“default-src”)." {file: "chrome://global/content/customElements.js" line: 499}]
[task 2023-05-31T13:15:56.943Z] 13:15:56 INFO - Console message: [JavaScript Error: "Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“default-src”)." {file: "chrome://global/content/elements/panel.js" line: 62}]
[task 2023-05-31T13:15:57.283Z] 13:15:57 INFO - Toolbox opened and focused
[task 2023-05-31T13:15:57.284Z] 13:15:57 INFO - Waiting on sources: my file.js
[task 2023-05-31T13:15:57.285Z] 13:15:57 INFO - Finished waiting on sources: my file.js
[task 2023-05-31T13:15:57.286Z] 13:15:57 INFO - waiting for 1 files in the source tree
[task 2023-05-31T13:15:57.312Z] 13:15:57 INFO - GECKO(1579) | [WARN webrender::renderer::init] asking to enable_gpu_markers but no supporting extension was found
[task 2023-05-31T13:15:57.408Z] 13:15:57 INFO - GECKO(1579) | [Parent 1579, Main Thread] WARNING: NS_ENSURE_TRUE(weakFrame.IsAlive()) failed: file /builds/worker/checkouts/gecko/layout/xul/nsXULPopupManager.cpp:1384
[task 2023-05-31T13:15:57.422Z] 13:15:57 INFO - GECKO(1579) | [WARN webrender::renderer::init] asking to enable_gpu_markers but no supporting extension was found
[task 2023-05-31T13:15:57.638Z] 13:15:57 INFO - GECKO(1579) | [Parent 1579, Main Thread] WARNING: NS_ENSURE_TRUE(weakFrame.IsAlive()) failed: file /builds/worker/checkouts/gecko/layout/xul/nsXULPopupManager.cpp:1384
[task 2023-05-31T13:15:57.699Z] 13:15:57 INFO - GECKO(1579) | [WARN webrender::renderer::init] asking to enable_gpu_markers but no supporting extension was found
[task 2023-05-31T13:15:57.896Z] 13:15:57 INFO - TEST-PASS | devtools/client/debugger/test/mochitest/browser_dbg-features-source-tree.js | source name is decoded in the tree -
Reporter | ||
Comment 8•2 years ago
|
||
Strange that didn't show up on try server, however I found a case in devtools which was intentionally ignoring a module, but based on the .jsm name.
I'm pretty sure the TV failure is pre-existing. Checking that at the moment.
Reporter | ||
Comment 9•2 years ago
•
|
||
Filed bug 1836074 for the perma fail TV.
Comment 10•2 years ago
|
||
Comment 11•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9c02dd904edb
https://hg.mozilla.org/mozilla-central/rev/b186bca573de
Description
•