Commit Graph
49 Commits
Author SHA1 Message Date
Julian Descottes 1bb7ba8e3b Bug 1899389 - [devtools] Use credentials for devtools sourcemap fetch call r=devtools-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D212059
2024-05-30 08:27:28 +00:00
Dave Townsend 2af4d349f3 Bug 1864896: Autofix unused function arguments (devtools). r=profiler-reviewers,devtools-reviewers,nchevobbe,julienw
Differential Revision: https://phabricator.services.mozilla.com/D202959
2024-03-05 14:21:15 +00:00
Alexandre Poirot eae3d6b2b7 Bug 1834725 - [devtools] Retrieve the resolved source map URL and source map error. r=devtools-reviewers,nchevobbe
Extract information out of the source map worker to be stored into the Debugger store.

Renamed SourceMapLoader getOriginalURLs to loadSourceMap to better translate the heavy process involved in this method.
While doing that, also inline the transfer of source map ignore list in this call (instead of always having another worker message right after).

This will be used and tested in the next changeset.

Differential Revision: https://phabricator.services.mozilla.com/D188585
2024-01-15 12:57:19 +00:00
Alexandre Poirot e1abf62065 Bug 1834725 - [devtools] Log source map errors to the console directly from SourceMapLoader. r=devtools-reviewers,nchevobbe
The main goal here is to re-throw the exception so that the debugger can start displaying source map errors.

Note that the previous changeset tweaked the StyleEditor code to handle exceptions.
The Debugger will be handled in the next changeset.

Differential Revision: https://phabricator.services.mozilla.com/D187576
2024-01-15 12:57:19 +00:00
Natalia Csoregi 63d346b505 Backed out 4 changesets (bug 1834725) for causing failures on browser_styleeditor_loading_with_containers.js. CLOSED TREE
Backed out changeset 0965e956200a (bug 1834725)
Backed out changeset 4a8151163607 (bug 1834725)
Backed out changeset a56f42223377 (bug 1834725)
Backed out changeset a920356b63eb (bug 1834725)
2024-01-11 19:57:47 +02:00
Alexandre Poirot e563562e9a Bug 1834725 - [devtools] Retrieve the resolved source map URL and source map error. r=devtools-reviewers,nchevobbe
Extract information out of the source map worker to be stored into the Debugger store.

Renamed SourceMapLoader getOriginalURLs to loadSourceMap to better translate the heavy process involved in this method.
While doing that, also inline the transfer of source map ignore list in this call (instead of always having another worker message right after).

This will be used and tested in the next changeset.

Differential Revision: https://phabricator.services.mozilla.com/D188585
2024-01-11 15:27:25 +00:00
Alexandre Poirot 31e7b41420 Bug 1834725 - [devtools] Log source map errors to the console directly from SourceMapLoader. r=devtools-reviewers,nchevobbe
The main goal here is to re-throw the exception so that the debugger can start displaying source map errors.

Note that the previous changeset tweaked the StyleEditor code to handle exceptions.
The Debugger will be handled in the next changeset.

Differential Revision: https://phabricator.services.mozilla.com/D187576
2024-01-11 15:27:25 +00:00
Alexandre Poirot 242b81d5ff Bug 1834729 - [devtools] Provide link to the related original file in the footer. r=devtools-reviewers,nchevobbe
For now, we were only showing the related bundle file,
so that we can easily navigate from original file to bundle file.
But we could also show the related original file for a location.
This is slightly more complex because the mapped location can now be different
depending on the precise location in the selected file.
Also, there is no synchronous API to compute this mapped location.
We have to involve an asynchronous action to compute this data for bundles.

Tweak Source Map Loader in order to do a loose bundle to original mapping
in case we aren't in a cursor location that has a perfect match.
Try mapping the first column of the same line and then all first column of
the next 10 following lines.

Differential Revision: https://phabricator.services.mozilla.com/D187573
2023-12-20 23:01:21 +00:00
Mark Banner ebbea0ff69 Bug 1866641 - Rename workers to use the .worker.(m)js pattern for ESLint (devtools/). r=devtools-reviewers,profiler-reviewers,nchevobbe,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D194698
2023-11-30 11:42:17 +00:00
Iulian Moraru 619a2745f7 Backed out 3 changesets (bug 1866641) for causing talos damp failures on browser-toolbox.js. CLOSED TREE
Backed out changeset 7cab7eb61b23 (bug 1866641)
Backed out changeset dbe3fabc6e89 (bug 1866641)
Backed out changeset 1dfb7cfdc26e (bug 1866641)
2023-11-29 21:00:42 +02:00
Mark Banner a3b85c10e2 Bug 1866641 - Rename workers to use the .worker.(m)js pattern for ESLint (devtools/). r=devtools-reviewers,profiler-reviewers,nchevobbe,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D194698
2023-11-29 11:49:18 +00:00
Alexandre Poirot d1f78ac0a4 Bug 1856658 - [devtools] Better integrate SourceMapLoader into breakable positions computation. r=devtools-reviewers,nchevobbe
We can avoid the creation of an handful of object creations by passing
the "breakpoint positions" objects directly to the Source Map Loader.
(avoid convertToList)

We can also tune `SourceMapLoader.getOriginalLocations` output to better
fit the requirements of the main thread.

Differential Revision: https://phabricator.services.mozilla.com/D189950
2023-10-05 15:03:32 +00:00
Alexandre Poirot 3b21974b94 Bug 1856658 - [devtools] Drop unused options/search argument to getOriginalLocation(s). r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D189949
2023-10-05 15:03:31 +00:00
Tom Marble 6c1231e2e8 Bug 1853244 - convert .ini manifests to .toml: batch 6 {caps,devtools,dom}/**/browser.ini r=jmaher,media-playback-reviewers,devtools-reviewers,profiler-reviewers,alwu,nchevobbe,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D188856
2023-09-22 20:42:14 +00:00
Kershaw Chang 8c73084fff Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu
Differential Revision: https://phabricator.services.mozilla.com/D181251
2023-06-28 13:21:00 +00:00
Norisz Fay a17cc174f1 Backed out 2 changesets (bug 1838829) for causing perma mochitest failure with dom/websocket/tests being skipped CLOSED TREE
Backed out changeset 19a5d4f1850a (bug 1838829)
Backed out changeset 97cd8a256954 (bug 1838829)
2023-06-27 02:52:52 +03:00
Kershaw Chang 49115434d9 Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu
Differential Revision: https://phabricator.services.mozilla.com/D181251
2023-06-26 14:22:14 +00:00
Norisz Fay da37f6c50c Backed out 5 changesets (bug 1838829) for causing mochitest failures CLOSED TREE
Backed out changeset 693d34c8447d (bug 1838829)
Backed out changeset 903d9ff4afaa (bug 1838829)
Backed out changeset 5e51feff7467 (bug 1838829)
Backed out changeset e125be49d2a6 (bug 1838829)
Backed out changeset 1a8cf3c83dc4 (bug 1838829)
2023-06-22 03:37:07 +03:00
Kershaw Chang 8ae645cecc Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu
Differential Revision: https://phabricator.services.mozilla.com/D181251
2023-06-21 19:43:33 +00:00
Alexandre Poirot f9f9928fef Bug 1833095 - [devtools] Return null from source map loader/worker when no mapping is found. r=devtools-reviewers,bomsy
This helps the callsite in the main thread to distinguish between being mapped
or lack of mappings.
Doing this prevent returning back the exact same location and could spare some cycles.

Differential Revision: https://phabricator.services.mozilla.com/D178389
2023-05-25 21:16:23 +00:00
Hubert Boma Manilla 0ab4d94f23 Bug 1824705 - [devtools] Add support for sourcemaps ignore list r=devtools-reviewers,nchevobbe
Also there is a patch to add support for ignoreList to the sourcemap library
https://github.com/mozilla/source-map/pull/481

Differential Revision: https://phabricator.services.mozilla.com/D174357
2023-05-23 08:16:55 +00:00
Butkovits Atila f21dc3465a Backed out 2 changesets (bug 1824705) for causing failures at browser_misused_characters_in_strings.js. CLOSED TREE
Backed out changeset d67c783fcd63 (bug 1824705)
Backed out changeset d6d2c97f858d (bug 1824705)
2023-05-23 00:40:24 +03:00
Hubert Boma Manilla 327f77f3aa Bug 1824705 - [devtools] Add support for sourcemaps ignore list r=devtools-reviewers,nchevobbe
Also there is a patch to add support for ignoreList to the sourcemap library
https://github.com/mozilla/source-map/pull/481

Differential Revision: https://phabricator.services.mozilla.com/D174357
2023-05-22 18:27:16 +00:00
Mark Banner 0666077666 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Mark Banner 91fde42f7b Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Julian Descottes 39326f265f Bug 1826954 - [devtools] Disable devtools tests and test suites failing with http3 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D174528
2023-04-26 22:43:59 +00:00
Natalia Csoregi 43331bed4b Backed out 3 changesets (bug 1826954) for causing http3 failures e.g. browser_net_http3_request_details.js. CLOSED TREE
Backed out changeset fc397a601a63 (bug 1826954)
Backed out changeset 85ad3cfdbe1c (bug 1826954)
Backed out changeset 62802fc23ffe (bug 1826954)
2023-04-26 12:21:10 +03:00
Julian Descottes 29d3d81ba9 Bug 1826954 - [devtools] Disable devtools tests and test suites failing with http3 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D174528
2023-04-26 07:00:50 +00:00
Alexandre Poirot 58e1fc3a25 Bug 1829607 - [devtools] Fix exception message when original file failed loading. r=devtools-reviewers,nchevobbe
networkEvent was throwing string exception, which were poorly handled.

Differential Revision: https://phabricator.services.mozilla.com/D176348
2023-04-25 13:42:31 +00:00
Hubert Boma Manilla f8f50ae023 Bug 1790542 - [devtools] Do not allow redirects on the 'sourceMappingUrl' r=jdescottes,devtools-reviewers
- Block redirects on sourceMappingUrl
- Add debugger test

Differential Revision: https://phabricator.services.mozilla.com/D168648
2023-03-07 16:26:41 +00:00
Nicolas Chevobbe c015aed4da Bug 1814652 - [devtools] Rename SourceMapLoader#applySourceMap and change its signature. r=ochameau.
Let's make it take an array of ids so we don't need
to create multiple SourceMapConsumer.

Differential Revision: https://phabricator.services.mozilla.com/D168685
2023-02-07 15:05:36 +00:00
Nicolas Chevobbe 71c11e2b03 Bug 1815452 - [devtools] Simplify mapping structure posted to/from workers. r=ochameau,bomsy.
We used to get the mappings array from the pretty fast worker to the prettyPrint
action, and then pass this array to the sourceMap service (also a worker).
As the mapping can be quite large, and given it has a complex shape, passing it
to and from workers (via `postMessage`) was costly.

So here, instead of passing only the mapping, we directly generate the sourceMap
from the pretty fast worker, and pass it to the action which forwards it to
the sourceMap service.

This helps reduce the overhead we were seeing when not buffering the lines in
the pretty print worker, in the previous patch of this stack.

Differential Revision: https://phabricator.services.mozilla.com/D168384
2023-02-07 15:05:35 +00:00
Mark Banner b3474f4614 Bug 1812977 - Remove now unnecessary import-globals-from statements in devtools. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D168071
2023-01-30 19:33:38 +00:00
Alexandre Poirot bf518e5f11 Bug 1805378 - [devtools] Make the SourceMapLoader be instantiated per toolbox. r=bomsy,perftest-reviewers,kshampur
This complexify the existing tests a bit, but will make the management from the Toolbox more obvious.

The metrics test highlights that we allow to prevent loading the sourcemap modules
unless it is strictly necessary!

(Also I forgot to remove the source-map-loader from the list of browser loader module...)

Differential Revision: https://phabricator.services.mozilla.com/D164694
2022-12-20 19:09:57 +00:00
Alexandre Poirot 54915478d2 Bug 1805378 - [devtools] Automatically start the worker on first WorkerDispatcher invoke/task call. r=bomsy,perftest-reviewers,kshampur
Because of this, we have to now pass the worker URL via WorkerDispatcher constructor.
Doing this should help then extend WorkerDispatcher instead of manually instantiating it.

About browser_jsterm_hide_when_devtools_chrome_enabled_false.js, as the SourceMapLoader
is now started lazily, the worker is no longer started during this test
and so we no longer have to wait for it.

And browser_jsterm_await_paused.js was failing because we resumed too quickly.
I added some code to better wait for awaitExpression full evaluation.

Differential Revision: https://phabricator.services.mozilla.com/D164547
2022-12-20 19:09:56 +00:00
Stanca Serban a07226cd80 Backed out 7 changesets (bug 1805378) for causing failures in source-map-loader.js. CLOSED TREE
Backed out changeset 4dd1ad435728 (bug 1805378)
Backed out changeset 5479ff3a475f (bug 1805378)
Backed out changeset bd89280bde1a (bug 1805378)
Backed out changeset 1bd4fec4b964 (bug 1805378)
Backed out changeset 975bd01106d7 (bug 1805378)
Backed out changeset 9a1e0541748a (bug 1805378)
Backed out changeset 926ce2f2d51f (bug 1805378)
2022-12-19 23:29:20 +02:00
Alexandre Poirot cf1aba2a05 Bug 1805378 - [devtools] Make the SourceMapLoader be instantiated per toolbox. r=bomsy
This complexify the existing tests a bit, but will make the management from the Toolbox more obvious.

The metrics test highlights that we allow to prevent loading the sourcemap modules
unless it is strictly necessary!

(Also I forgot to remove the source-map-loader from the list of browser loader module...)

Differential Revision: https://phabricator.services.mozilla.com/D164694
2022-12-19 17:00:37 +00:00
Alexandre Poirot 9f8dbaf1d5 Bug 1805378 - [devtools] Automatically start the worker on first WorkerDispatcher invoke/task call. r=bomsy
Because of this, we have to now pass the worker URL via WorkerDispatcher constructor.
Doing this should help then extend WorkerDispatcher instead of manually instantiating it.

About browser_jsterm_hide_when_devtools_chrome_enabled_false.js, as the SourceMapLoader
is now started lazily, the worker is no longer started during this test
and so we no longer have to wait for it.

And browser_jsterm_await_paused.js was failing because we resumed too quickly.
I added some code to better wait for awaitExpression full evaluation.

Differential Revision: https://phabricator.services.mozilla.com/D164547
2022-12-19 17:00:36 +00:00
Alexandre Poirot 509842f770 Bug 1801695 - [devtools] Remove Proxy on top of SourceMapLoader. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D162968
2022-12-12 13:15:52 +00:00
Alexandre Poirot 66290fbbd9 Bug 1801695 - [devtools] Remove applySourceMap proxy in favor of an event. r=bomsy
This will help get rid of the proxy entirely.

Differential Revision: https://phabricator.services.mozilla.com/D162967
2022-12-12 13:15:52 +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
Alexandre Poirot 28b5b6fbba Bug 1801695 - [devtools] Store worker URL in their index.js module instead of callsite. r=bomsy
This simplify the frontend code/callsites by not having to know where the worker file is.

Differential Revision: https://phabricator.services.mozilla.com/D162965
2022-12-12 13:15:51 +00:00
Alexandre Poirot 864f3ec609 Bug 1801621 - [devtools] Document source map requests module. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D162566
2022-11-24 14:57:49 +00:00
Alexandre Poirot a6fdd5313b Bug 1801621 - [devtools] Remove useless createConsumer intermediate module. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D162565
2022-11-24 14:57:49 +00:00
Alexandre Poirot aaa32f2c49 Bug 1801621 - [devtools] Avoid creating WorkerDispatch task on each worker method call. r=bomsy
WorkerDispatcher.invoke will instantiate a new "Task" method on each call.
Ideally, we should only use WorkerDispatch.task(), unless the related method is called once.

Differential Revision: https://phabricator.services.mozilla.com/D162564
2022-11-24 14:57:48 +00:00
Alexandre Poirot f30316fadf Bug 1801621 - [devtools] Remove unused getAllGeneratedLocations. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D162563
2022-11-24 14:57:48 +00:00
Alexandre Poirot 07deae9a5f Bug 1801621 - [devtools] Remove asset root setters. r=bomsy
Instead we could always load the wasm file when the modules are loaded.

Differential Revision: https://phabricator.services.mozilla.com/D162562
2022-11-24 14:57:48 +00:00
Alexandre Poirot 6659c6d1bb Bug 1794693 - [devtools] Convert source-map jest test into mochitests. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D159116
2022-11-08 16:01:01 +00:00
Alexandre Poirot 8c00f1d413 Bug 1794693 - [devtools] Move devtools-source-map to regular mozilla-central code. r=bomsy,perftest-reviewers,jdescottes,sparky
This used to be a node package. Let's make it become regular commonjs devtools modules.
This will make it trivial to migrate this to ES Modules.
Also possibly make this code become the unique layer in m-c on top of the source-map package.

We no longer use webpack to build the two bundles (index.js and worker.js),
instead, we are using the toolkit worker loader (require.js) in order to load
all this code without any build step.

As this is no longer a node package, I removed node-specific modules (assertRoot/wasmAsset)
and simplify the definition of wasm file URIs as they are now fixed.

Also moving the debugger to load internal "devtools/client/shared/source-map/source-map.js"
module in jest as running the Web Worker instantiated by source-map/index.js is too complex.

Differential Revision: https://phabricator.services.mozilla.com/D159115
2022-11-08 16:01:01 +00:00