Commit Graph
29 Commits
Author SHA1 Message Date
Lorenz A 1e90610dee Bug 2004234 - [devtools] Turn devtools/shared/loader/Loader.sys.mjs into an ES class. r=devtools-reviewers,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D275639
2025-12-11 07:06:07 +00:00
Mark Banner 2542790f53 Bug 1998787 - Automatic fixes for enabling ESLint jsdoc/tag-line rule everywhere. r=frontend-codestyle-reviewers,mtigley,perftest-reviewers,nchevobbe,home-newtab-reviewers,Gijs,mconley,sparky
Differential Revision: https://phabricator.services.mozilla.com/D271745
2025-11-10 21:27:12 +00:00
Alexandre Poirot 95222ec51e Bug 1970328 - [devtools] Remove DevToolsLoader's invisibleToDebugger flag. r=devtools-reviewers,jdescottes
This flag was only used by the allocation tracker test and we can now rely on the
DevTools global spawn by mozJSModuleLoader.

Differential Revision: https://phabricator.services.mozilla.com/D253049
2025-06-11 16:01:34 +00:00
Alexandre Poirot 382fe92da5 Bug 1970328 - [devtools] Load DevTools server modules in a distinct compartment when debuggign xpcshell tests. r=devtools-reviewers,jdescottes
The 'invisibleToDebugger' flag was misleading and making all Loaders be indebuggable on xcpshell.
But we have to keep spawning the xpcshell's DevToolsServer in the distinct "devtools" global
in order to be able to debug the tests and devtools globals now all spawn in the shared system global.

Differential Revision: https://phabricator.services.mozilla.com/D252530
2025-06-11 16:01:31 +00:00
Florian Quèze a1da324152 Bug 1950710 - remove the TelemetryStopwatch API, r=chutten,devtools-reviewers,home-newtab-reviewers,frontend-codestyle-reviewers,mconley,nchevobbe.
Differential Revision: https://phabricator.services.mozilla.com/D242560
2025-03-26 20:46:45 +00:00
Tooru Fujisawa a7b25dca83 Bug 1934044 - Update obsoleve comments about JSM in devtools. r=devtools-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D230562
2024-12-02 21:17:45 +00:00
Julian Descottes 6498ec9ae7 Bug 972821 - [devtools] Support data URLs in netmonitor r=devtools-reviewers,bomsy
Display requests in the netmonitor for data URIs.
Currently, some data-uris are leaking from internal stylesheets such as resource://gre-resources/html.css but this should hopefully be rare.

Another bug has been filed to properly filter out those requests.

A simple test is added to make sure we can see parent process and content process data uris.

Differential Revision: https://phabricator.services.mozilla.com/D217413
2024-11-26 18:36:56 +00:00
Butkovits Atila 79305b06ad Backed out 2 changesets (bug 1932818, bug 972821) for causing failures at browser_keyword.js. CLOSED TREE
Backed out changeset 47548f2ad19d (bug 1932818)
Backed out changeset 5866bcc8111e (bug 972821)
2024-11-26 18:34:32 +02:00
Julian Descottes 118c9ef5b1 Bug 972821 - [devtools] Support data URLs in netmonitor r=devtools-reviewers,bomsy
Display requests in the netmonitor for data URIs.
Currently, some data-uris are leaking from internal stylesheets such as resource://gre-resources/html.css but this should hopefully be rare.

Another bug has been filed to properly filter out those requests.

A simple test is added to make sure we can see parent process and content process data uris.

Differential Revision: https://phabricator.services.mozilla.com/D217413
2024-11-26 13:58:54 +00:00
Florian Quèze f109f4cf1f Bug 1921751 - Migrate telemetry events to use Glean APIs for devtools.main, r=chutten,devtools-reviewers,nchevobbe.
Differential Revision: https://phabricator.services.mozilla.com/D223504
2024-09-30 14:37:48 +00:00
Gregory Pappas 5e942dde11 Bug 1546738 - Get rid of the hidden window usage to get a WebSocket object r=ochameau,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D219620
2024-08-21 20:07:14 +00:00
Alexandre Poirot 5eeea2b7d6 Bug 1651518 - [devtools] Enable server side worker targets for browser toolbox. r=devtools-reviewers,nchevobbe
Note that the ignore code for subprocess is being ported from the legacy worker watcher.

The Worker Target URL is now correctly set to the Absolute URL,
this has an impact on the context selector as we are displaying it.

Also, this patch highlights some issues around Common JS Loader and the distinct compartment
to be used when debugging privileged page, or when running the browser toolbox.
It caused leaks when running browser toolbox tests in debug builds.
The JS Process Actor is directly loaded in a distinct global and compartment "DevTools global",
thanks to `loadInDevToolsLoader` flag of BrowserToolboxDevToolsProcess JS Process Actor configuration.
There is no need to use `useDistinctSystemPrincipalLoader` helper as Loader.sys.mjs, loaded from
the JS Process Actor will also be loaded in the distinct global.
Then, we only need to ensure that the CommonJS Loader will also pick up the "DevTools global"
when it is loaded in that distinct global.
Things will be significantly easier once we migrate from CommonJS to ESM as the `{ global: "contextual" }`
option passed to `ChromeUtils.importESModule` will do the right thing, as well as static `import` statements.

Differential Revision: https://phabricator.services.mozilla.com/D204874
2024-05-27 09:53:55 +00:00
Cristian Tuns d0272b92b7 Backed out 8 changesets (bug 1651518, bug 1883847) dt failures in nsTArray.h. CLOSED TREE
Backed out changeset 481558275c1d (bug 1651518)
Backed out changeset 5337435e8bca (bug 1651518)
Backed out changeset 8fe0c1a4da7f (bug 1651518)
Backed out changeset 840a0d9db260 (bug 1651518)
Backed out changeset eaab9de5819d (bug 1651518)
Backed out changeset cf71de92d782 (bug 1651518)
Backed out changeset d778691464db (bug 1651518)
Backed out changeset af28e5f719e8 (bug 1883847)
2024-05-22 09:02:19 -04:00
Alexandre Poirot 76d52e829a Bug 1651518 - [devtools] Enable server side worker targets for browser toolbox. r=devtools-reviewers,nchevobbe
Note that the ignore code for subprocess is being ported from the legacy worker watcher.

The Worker Target URL is now correctly set to the Absolute URL,
this has an impact on the context selector as we are displaying it.

Also, this patch highlights some issues around Common JS Loader and the distinct compartment
to be used when debugging privileged page, or when running the browser toolbox.
It caused leaks when running browser toolbox tests in debug builds.
The JS Process Actor is directly loaded in a distinct global and compartment "DevTools global",
thanks to `loadInDevToolsLoader` flag of BrowserToolboxDevToolsProcess JS Process Actor configuration.
There is no need to use `useDistinctSystemPrincipalLoader` helper as Loader.sys.mjs, loaded from
the JS Process Actor will also be loaded in the distinct global.
Then, we only need to ensure that the CommonJS Loader will also pick up the "DevTools global"
when it is loaded in that distinct global.
Things will be significantly easier once we migrate from CommonJS to ESM as the `{ global: "contextual" }`
option passed to `ChromeUtils.importESModule` will do the right thing, as well as static `import` statements.

Differential Revision: https://phabricator.services.mozilla.com/D204874
2024-05-22 11:50:45 +00:00
Cristina Horotan ca70119cfa Backed out 8 changesets (bug 1651518, bug 1883847) for causing damp failures at toolbox/browser-toolbox.js CLOSED TREE
Backed out changeset 4ec70db12f48 (bug 1651518)
Backed out changeset b2b138889ad6 (bug 1651518)
Backed out changeset efda5c09b0ea (bug 1651518)
Backed out changeset b0de4113f8fb (bug 1651518)
Backed out changeset 03cf235d2a80 (bug 1651518)
Backed out changeset 58e71c27f1fd (bug 1651518)
Backed out changeset f7fb390c3965 (bug 1651518)
Backed out changeset b8a2473c47c0 (bug 1883847)
2024-05-22 04:00:53 +03:00
Alexandre Poirot 64b2f242bc Bug 1651518 - [devtools] Enable server side worker targets for browser toolbox. r=devtools-reviewers,nchevobbe
Note that the ignore code for subprocess is being ported from the legacy worker watcher.

Also, this patch highlights some issues around Common JS Loader and the distinct compartment
to be used when debugging privileged page, or when running the browser toolbox.
It caused leaks when running browser toolbox tests in debug builds.
The JS Process Actor is directly loaded in a distinct global and compartment "DevTools global",
thanks to `loadInDevToolsLoader` flag of BrowserToolboxDevToolsProcess JS Process Actor configuration.
There is no need to use `useDistinctSystemPrincipalLoader` helper as Loader.sys.mjs, loaded from
the JS Process Actor will also be loaded in the distinct global.
Then, we only need to ensure that the CommonJS Loader will also pick up the "DevTools global"
when it is loaded in that distinct global.
Things will be significantly easier once we migrate from CommonJS to ESM as the `{ global: "contextual" }`
option passed to `ChromeUtils.importESModule` will do the right thing, as well as static `import` statements.

Differential Revision: https://phabricator.services.mozilla.com/D204874
2024-05-21 14:09:35 +00:00
Alexandre Poirot 27a1221161 Bug 1812646 - [devtools] Convert base-loader JSM to ESM. r=devtools-reviewers,jdescottes
Having it be a JSM make it so that part of the loader is still using the
shared loader global, which can cause various troubles in the browser toolbox.

Differential Revision: https://phabricator.services.mozilla.com/D167962
2023-01-31 13:46:48 +00:00
Alexandre Poirot 07efa6dcf4 Bug 1808797 - [devtools] Add assertion to verify gDevTools is loaded only once. r=jdescottes
The modification made to Loader isn't necessary as the sandboxName
isn't relevant/used. The global will be the one crafted by C++
and be named "Devtools global".
But in case something change, this may catch yet another unexpected behavior.

Differential Revision: https://phabricator.services.mozilla.com/D166122
2023-01-20 09:41:03 +00:00
Iulian Moraru e847342c5e Backed out changeset 184e7ccf3c01 (bug 1808797) for causing multiple failures. CLOSED TREE 2023-01-16 17:44:14 +02:00
Alexandre Poirot d0e5f1de0b Bug 1808797 - [devtools] Add assertion to verify gDevTools is loaded only once. r=jdescottes
The modification made to Loader isn't necessary as the sandboxName
isn't relevant/used. The global will be the one crafted by C++
and be named "Devtools global".
But in case something change, this may catch yet another unexpected behavior.

Differential Revision: https://phabricator.services.mozilla.com/D166122
2023-01-16 14:04:54 +00:00
Alexandre Poirot df719160ef Bug 1801695 - [devtools] Use regular devtools loader to load SourceMap modules. r=bomsy
Now that source-map-loader uses ChromeLoader, it doesn't need to be loaded
via the Browser Loader. It was mostly used to be able to access window.Worker symbol.

It was also exposing `fetch` global symbol. DevTools Loader wasn't exposing it.
I fixed that as this symbol is available in JSM/ESM.

Differential Revision: https://phabricator.services.mozilla.com/D162966
2022-12-12 13:15:52 +00:00
Julian Descottes e1a7f602ec Bug 1796582 - [devtools] Load DistinctSystemPrincipalLoader in the dedicated DevToolsLoader global r=ochameau
Depends on D160215

Differential Revision: https://phabricator.services.mozilla.com/D160216
2022-10-28 08:06:38 +00:00
Julian Descottes 05e646b612 Bug 1796582 - [devtools] Extract helpers for distinctSystemPrincipalLoader to a dedicated module r=ochameau
Depends on D160214

Differential Revision: https://phabricator.services.mozilla.com/D160215
2022-10-28 08:06:38 +00:00
Stanca Serban 9c70023e79 Backed out 3 changesets (bug 1796582) for causing failures in test_invisible_loader.js. CLOSED TREE
Backed out changeset a365a7834657 (bug 1796582)
Backed out changeset fa0ff274795f (bug 1796582)
Backed out changeset 70af32ef6986 (bug 1796582)
2022-10-28 10:01:09 +03:00
Julian Descottes 303142285d Bug 1796582 - [devtools] Load DistinctSystemPrincipalLoader in the dedicated DevToolsLoader global r=ochameau
Depends on D160215

Differential Revision: https://phabricator.services.mozilla.com/D160216
2022-10-28 06:23:53 +00:00
Julian Descottes 148f62f92b Bug 1796582 - [devtools] Extract helpers for distinctSystemPrincipalLoader to a dedicated module r=ochameau
Depends on D160214

Differential Revision: https://phabricator.services.mozilla.com/D160215
2022-10-28 06:23:53 +00:00
Julian Descottes 1edbb4626c Bug 1788762 - [devtools] Load the NetworkObserver modules in DevToolsLoader if invisibleToDebugger is set r=ochameau
Depends on D156989

Differential Revision: https://phabricator.services.mozilla.com/D159219
2022-10-17 19:56:19 +00:00
Alexandre Poirot 71cb42360b Bug 1793604 - [devtools] Inject JSM/ESM globals directly from Loader.jsm/sys.mjs. r=jdescottes
ESM can't be loaded while loading.
So that Loader.jsm/sys.mjs can't load builtin-modules.js with itself loading Loader.jsm/sys.mjs.
We do that in order to inject JSM/ESM globals from builtin-modules.js.
Let's instead inject the few globals of JSM/ESM directly from Loader.

This isn't ideal, but as Loader is meant to be removed when moving to ESM...

Differential Revision: https://phabricator.services.mozilla.com/D158583
2022-10-14 12:19:42 +00:00
Alexandre Poirot bde84f5b65 Bug 1793604 - [devtools] Convert Loader.jsm to ESM. r=perftest-reviewers,geckoview-reviewers,preferences-reviewers,owlish,kshampur,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D158582
2022-10-14 12:19:42 +00:00