Commit Graph
17 Commits
Author SHA1 Message Date
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
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 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
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
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
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
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 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 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