Граф коммитов

3254 Коммитов

Автор SHA1 Сообщение Дата
Hubert Boma Manilla 110232617a Bug 1811040 - [devtools] No longer search in blackboxed files r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D168925
2023-02-08 06:14:46 +00:00
Hubert Boma Manilla 03c46580d5 Bug 1810990 - [devtools] Always show search results from minified source r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D168924
2023-02-08 06:14:46 +00:00
Hubert Boma Manilla 306ce0b2a2 Bug 1812022 - [devtools] Allow searching in third party scripts r=nchevobbe
Remove the hard-coded blocking of searching in third-party scripts.
We are later going to add a feature to allow the users filter out these files themselves

Differential Revision: https://phabricator.services.mozilla.com/D168261
2023-02-08 06:14:45 +00:00
Hubert Boma Manilla a13d122e4c Bug 1814255 - [devtools] Split up the project search tests r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D168923
2023-02-08 06:14:45 +00:00
Nicolas Chevobbe 60057fbfab 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 3290f20402 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 f641715496 Bug 1814609 - [devtools] Use mutable Maps in source actors reducer. r=devtools-reviewers,bomsy
Also stop modifying source actor objects by putting breakable lines on it.
Ideally source actors should be immutable object. There is only sourceMapURL left.

And clarified the fact that we are having source actor IDs everywhere and never a Source ID.

Differential Revision: https://phabricator.services.mozilla.com/D168661
2023-02-06 23:36:58 +00:00
Marian-Vasile Laza 09031e604f Backed out changeset afdded1ef7c3 (bug 1814609) for causing devtools failures on browser_aboutdebugging_serviceworker_console.js. CLOSED TREE 2023-02-03 21:44:56 +02:00
Alexandre Poirot 3ba387dc47 Bug 1814609 - [devtools] Use mutable Maps in source actors reducer. r=devtools-reviewers,bomsy
Also stop modifying source actor objects by putting breakable lines on it.
Ideally source actors should be immutable object. There is only sourceMapURL left.

And clarified the fact that we are having source actor IDs everywhere and never a Source ID.

Differential Revision: https://phabricator.services.mozilla.com/D168661
2023-02-03 18:15:03 +00:00
Nicolas Chevobbe 91b1a9fa4b Bug 1809909 - [devtools] Don't show prettyPrint icon on original tab. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D168031
2023-02-02 15:46:16 +00:00
Ryan Hunt a6ac9d9fd6 Bug 1792765 - wasm: Emit less breakpoint sites when debugging. r=yury
This eliminates 56.6% of the number of breakpoint sites when running the
linked in the bug blazor app in debugging.

Differential Revision: https://phabricator.services.mozilla.com/D159713
2023-02-02 01:25:33 +00:00
Neil Deakin 9c2e7458ba Bug 1776879, replace text/unicode for clipboard and drag and drop and use text/plain directly, r=edgar,mak,stransky,geckoview-reviewers,extension-reviewers,zombie,m_kato
Most usage is a straight replacement but gtk needs extra changes as it transfers plain text in UTF8 natively and needs to be converted into UTF16, and Windows uses single-byte characters for RTF and CF_HTML formats so we preserve this.

Differential Revision: https://phabricator.services.mozilla.com/D158587
2023-02-01 23:30:55 +00:00
Hubert Boma Manilla 5590a753bd Bug 1810979 - [devtools] Show source id for source without urls r=nchevobbe
This patch displays a source id for sources without urls in the project search results.
This source id matches that shown for the source tab.

Differential Revision: https://phabricator.services.mozilla.com/D168246
2023-01-31 17:16:49 +00:00
Hubert Boma Manilla a8c20b3cc0 Bug 1810979 - [devtools] Fix source tab names for sources with no urls r=nchevobbe
Found a bug where we just showing `SOURCE` in the tab for sources without urls,
instead of the actual source ids. e.g `SOURCE` instead of `SOURCEsource39`
This patch fixes the issue to show
- The source id ie. `(source39)`
- No need for the duplicate `SOURCE`

Differential Revision: https://phabricator.services.mozilla.com/D168245
2023-01-31 17:16:48 +00:00
Hubert Boma Manilla 83f86a9fce Bug 1812023 - [devtools] Move jest tests to mochitests r=ochameau
- Trying to move all the jest tests for project-search to mochitests
- Renaming browser_dbg-search-project.js to browser_dbg-project-search.js for consistency.
- Keeping project-search.spec.js for now, will figure out how to move to xpcshell in abit.

Differential Revision: https://phabricator.services.mozilla.com/D167786
2023-01-31 17:16:47 +00:00
Mark Banner 106725dcfc Bug 1813377 - Clean up XPCNativeWrapper globals handling for ESLint. r=mccr8
XPCNativeWrapper may be going away (bug 1481337). Stop defining it in the main environments and only define it
where necessary to discourage more uses.
This also helps to clarify the ESLint test environment globals.

Differential Revision: https://phabricator.services.mozilla.com/D168211
2023-01-30 21:55:25 +00:00
Mark Banner 4fcd8b1d2b 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 8e9b448440 Bug 1766485 - [devtools] Consider server side target switching always enabled for tab toolboxes. r=devtools-reviewers,nchevobbe
This removes the devtools.target-switching.server.enabled preference,
which was only having an impact on tab debugging.
Toolboxes other than tabs aren't yet using "server side target switching",
which will probably happen once we enable EFT in these and
we would probably not use a preference for enabling this.

This remove all assertions in tests covering client side target switching.
And it removed a couple of tests that became irrelevant.

Differential Revision: https://phabricator.services.mozilla.com/D166921
2023-01-30 12:49:54 +00:00
Alexandre Poirot d906cdb5af Bug 1811257 - [devtools] Fix browser toolbox debugger source tree when using the iframe dropdown. r=devtools-reviewers,jdescottes
The debugger and the thread actor don't support window-global target actor's iframe switching.
So disable this entirely in the frontend.

This feature only applies to webextension and browser toolbox
which are the only one supporting more than one target and still
not EFT-compliant.
Once they become compliant we might be able to work on the frontend
to support client side target selection and filtering the SourceTree
for the currently selected target.

Differential Revision: https://phabricator.services.mozilla.com/D167268
2023-01-25 20:30:57 +00:00
Nicolas Chevobbe b899deb406 Bug 1811429 - [devtools] Enable assertion in browser_dbg-pretty-print-paused-anonymous.js. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D167775
2023-01-25 11:32:11 +00:00
Mark Banner 1a90b9c57b Bug 1811820 - Change prettier config file from json to common js format. r=cmkm,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D167530
2023-01-24 22:53:55 +00:00
Nicolas Chevobbe 776b818846 Bug 1811233 - [devtools] Add test for pretty-printing eval source. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D167273
2023-01-20 16:58:58 +00:00
Nicolas Chevobbe ce80cf7f53 Bug 1811250 - [devtools] Don't use mask-image for source tree file icons. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D167258
2023-01-20 16:26:34 +00:00
Butkovits Atila e41fb08751 Backed out changeset f07a22692ff0 (bug 1811233) for causing failures at browser_dbg-pretty-print-paused-anonymous.js. CLOSED TREE 2023-01-20 18:00:06 +02:00
Nicolas Chevobbe 37dcdbb820 Bug 1811233 - [devtools] Add test for pretty-printing eval source. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D167273
2023-01-20 14:59:11 +00:00
Alexandre Poirot fdaf5e0250 Bug 1687166 - [devtools] Fetch whole source text for "new Function()" sources. r=arai,bomsy
But keep unwrapping sources for DOM event handlers like:
  <div onclick="foo()" />
Whose source should be:
  foo()
and not:
  function onclick() { foo() }

Differential Revision: https://phabricator.services.mozilla.com/D165721
2023-01-20 09:45:02 +00:00
Nicolas Chevobbe df6bba40e4 Bug 1810409 - [devtools] Simplify pretty-fast.js .r=ochameau.
- Replace custom repeat function with String#repeat
- Switch dictionnaries from Objects to Sets

Differential Revision: https://phabricator.services.mozilla.com/D166892
2023-01-20 06:46:57 +00:00
Nicolas Chevobbe a0a0b794a1 Bug 1804886 - [devtools] Update pretty-print-worker bundle . r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D166674
2023-01-20 06:46:57 +00:00
Nicolas Chevobbe b83f83a835 Bug 1804886 - [devtools] Fix complexity errors in pretty-fast.js . r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D166673
2023-01-20 06:46:56 +00:00
Nicolas Chevobbe 976814e1a9 Bug 1804886 - [devtools] Fix prefer-template errors in pretty-fast.js . r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D166672
2023-01-20 06:46:56 +00:00
Nicolas Chevobbe 8bf069b7d8 Bug 1804886 - [devtools] Fix no-shadow errors in pretty-fast.js . r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D166671
2023-01-20 06:46:55 +00:00
Nicolas Chevobbe 927931d392 Bug 1804886 - [devtools] Fix mozilla/var-only-at-top-level errors in pretty-fast.js . r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D166670
2023-01-20 06:46:55 +00:00
Nicolas Chevobbe 01163ec316 Bug 1804886 - [devtools] Run prettyFast test on CI. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D166555
2023-01-20 06:46:55 +00:00
Nicolas Chevobbe 04f0405f13 Bug 1804886 - [devtools] Move pretty-fast into debugger/src/workers/pretty-print. r=ochameau.
I disabled indivual eslint rules for the file and I'll
fix them in individual commits in this stack

Differential Revision: https://phabricator.services.mozilla.com/D166554
2023-01-20 06:46:54 +00:00
Nicolas Chevobbe 212403c985 Bug 1811207 - [devtools] Remove debugger-tests task and run debugger jest test via devtools-tests. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D167241
2023-01-19 14:55:40 +00:00
Nicolas Chevobbe 2d75836968 Bug 1543012 - [devtools] Migrate console node test to jest. r=jdescottes.
This makes the console behave like the other React panels.
We can also get rid of the specific bits for mocha in devtools-node-test-runner.js

Differential Revision: https://phabricator.services.mozilla.com/D167233
2023-01-19 14:55:39 +00:00
Ryan VanderMeulen 3bfc7ebe13 Backed out changeset 34c1c9be027d (bug 1769534) for causing bug 1801186. 2023-01-12 08:50:27 -05:00
Gijs Kruitbosch e085afe07b Bug 1808990 - remove background-image CSS for .CodeMirror .error which is a no-op, r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D166229
2023-01-11 15:30:18 +00:00
Alexandre Poirot 86df4589b3 Bug 1808603 - [devtools] Fix thread selection on navigation. r=devtools-reviewers,nchevobbe
This is surprising that no test started failing.
This may have broke various feature after reload.

Differential Revision: https://phabricator.services.mozilla.com/D165989
2023-01-10 11:43:59 +00:00
Alexandre Poirot 1d42b01915 Bug 1807898 - [devtools] Stop passing a sessionID to Toolbox. r=devtools-reviewers,nchevobbe
Telemetry class now self-compute the session ID attribute
and we no longer need to pass one down to Toolbox.

Differential Revision: https://phabricator.services.mozilla.com/D165717
2023-01-04 18:28:34 +00:00
Alexandre Poirot 1e099ff9c8 Bug 1807898 - [devtools] Remove all callsites passing a now-useless telemetry sessionId. r=devtools-reviewers,nchevobbe
Note that there is still one leftover usage of sessionId related to performance markers,
which isn't related to telemetry... but a way to distinguish toolbox instances.

Differential Revision: https://phabricator.services.mozilla.com/D165936
2023-01-04 18:28:33 +00:00
Alexandre Poirot d9265023c4 Bug 1807898 - [devtools] Reuse toolbox's Telemetry instance from all panels. r=devtools-reviewers,nchevobbe
This was slightly more tricky in the debugger as the toolbox's telemetry should be provided to the telemetry module.

Differential Revision: https://phabricator.services.mozilla.com/D165934
2023-01-04 18:28:33 +00:00
Nicolas Chevobbe 7566990b6c Bug 1804762 - [devtools] Use `background-image` for search spinner icon in debugger and netmonitor. r=jdescottes.
We were using `mask-image` as a way to make the icon the color
we wanted, but we can use `-moz-context-properties` for that instead.
Not using `mask-image` removes the glitchy thin border that was visible (see Bug 1787010).

Differential Revision: https://phabricator.services.mozilla.com/D165788
2023-01-02 14:12:10 +00:00
Sylvestre Ledru e2b52a1324 Bug 1807899 - Remove the trailing whitespace and Windows CR on md files r=linter-reviewers,necko-reviewers,marco,jesup
Differential Revision: https://phabricator.services.mozilla.com/D165662
2022-12-30 15:23:21 +00:00
Ryan VanderMeulen 5bdcb81ec5 Bug 1807238 - Enable TSAN mochitest-devtools by default. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D165462
2022-12-23 22:20:27 +00:00
Ryan VanderMeulen 3dcb8f6a60 Bug 1802862 - Skip browser_dbg-html-breakpoints.js on Linux debug and TSAN due to frequent timeouts. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D165397
2022-12-23 16:10:02 +00:00
Alexandre Poirot 1c7dd0b60c Bug 1806615 - [devtools] Rename sourceMaps to sourceMapsLoader in the debugger. r=jdescottes
This will help know which particular layer in source map stack we are using.

We could be using:
1) The source-map library from devtools/client/shared/vendor/source-map/
   Which parse and query the JSON representation of source maps.
2) The SourceMapLoader layer on top of the lib from devtools/client/shared/source-map-loader/
   Which helps load the lib within a worker and also handle all network requests to load
   the remote source map and original files.
3) The SourceMapURLService exposed via the Toolbox from devtools/client/framework/source-map-url-service.js
   Which helps glue Source and StyleSheet "devtools resources" (i.e. ResourceCommand resources) to original sources and stylesheets.

I also removed sourceMapsEnabled from reducer as this isn't used.
We always read the pref.
And removed a few of sourceMaps/client leftover symbols.

Differential Revision: https://phabricator.services.mozilla.com/D165137
2022-12-21 22:30:47 +00:00
Alexandre Poirot 349e48090b Bug 1806616 - [devtools] Rename Toolbox.parserService to parserWorker and merge it with debugger duplicated instance. r=jdescottes
The debugger was involving two distinct instances of parser worker.
One instance managed by the debugger "parserWorker" and another one
managed by the toolbox and also used by the console "evaluationsParser".

By reusing a shared instance we will increase the chance of parsing
files only once, simplify overall comprehension of the various workers
involved and may be speed up toolbox opening.

Differential Revision: https://phabricator.services.mozilla.com/D165136
2022-12-21 22:30:47 +00:00
Alexandre Poirot 52f6708144 Bug 1593753 - [devtools] Remove the "Browser Content Toolbox". r=jdescottes
The Browser Toolbox should be handy enough now with parent versus multiprocess modes
to debug the content process. The context selector in the right of the console evaluation
of the browser console and toolbox allow to select the content processes.
The thread selector in the debugger also allow to distinguish content processes.

Differential Revision: https://phabricator.services.mozilla.com/D164704
2022-12-21 13:57:49 +00:00
Alexandre Poirot 38f028ea51 Bug 1805378 - [devtools] Make all debugger worker use the same pattern an inherit from WorkerDispatcher. r=bomsy
Also align the one worker in netmonitor.

Differential Revision: https://phabricator.services.mozilla.com/D164692
2022-12-20 19:09:56 +00:00