Commit Graph
3922 Commits
Author SHA1 Message Date
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 b2844dc4bf Bug 1781941 - [devtools] Fix browser_dbg-integration-reloading-uncompressed-sourcemaps.js intermittent. r=devtools-reviewers,nchevobbe
We seem to never wait for the breakpoint to be actually visibile before calling assertBreakpoint,
but it seems that it is relevant in this particular test, in the uncompressed codepath.

Differential Revision: https://phabricator.services.mozilla.com/D210991
2024-05-21 12:24:29 +00:00
Alexandre Poirot f27b54d9d0 Bug 1835255 - [devtools] Fix browser_dbg-reducer-cleanup-on-target-removal.js intermittent. r=devtools-reviewers,nchevobbe
We were waiting for Sources, which are resources, but not the targets,
which are updated with a different logic and timings.

Differential Revision: https://phabricator.services.mozilla.com/D210943
2024-05-20 16:03:27 +00:00
Hubert Boma Manilla 6ee10584ed Bug 1890269 - [devtools] Implementing search highlight in codemirror 6 r=devtools-reviewers,nchevobbe
This patch
- Gets the search in file feature working for codemirror 6 (Use Ctrl/CMD F to open in the editor)
- Highlights search results in the editor, when using the search panel on the left.
- Includes the @codemirror/search package in the codemirror bundle. This enables using the `RegExpCursor`

Differential Revision: https://phabricator.services.mozilla.com/D208110
2024-05-20 09:50:41 +00:00
Hubert Boma Manilla 999135a4da Bug 1891336 - [devtools] Highlight text during pause and for exceptions r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D207418
2024-05-19 22:28:23 +00:00
Hubert Boma Manilla 2db2984f38 Bug 1889281 - [devtools] Display column breakpoints for codemirror 6 r=devtools-reviewers,nchevobbe
This patch creates a new extension and api enable marking content nodes

Differential Revision: https://phabricator.services.mozilla.com/D207408
2024-05-19 22:28:23 +00:00
Hubert Boma Manilla 412baef0b9 Bug 1894725 - [devtools] Scroll to the function when using the copy function context menu item r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D209676
2024-05-19 22:24:16 +00:00
Nicolas Chevobbe 468323a509 Bug 1888645 - [devtools] Fix SmartTrace crash with wasm frames. r=devtools-reviewers,bomsy.
In some cases, we were getting null sourceId, which was causing an exception
to be thrown in `getFormattedSourceId` since it expects a string.
We add a simple guard in this function so we don't throw anymore.

But we shouldn't get null sourceId in the first place. It looks like for
some Wasm sources, the SavedFrame sourceId can be 0, which wasn't playing
well with some loose check we were doing in the sources manager.

Finally, the "Copy metadata" button we display when a console message crash
wasn't working. The message now includes the targetFront, which can be serialized
in JSON, so we simply ignore it.

Differential Revision: https://phabricator.services.mozilla.com/D206105
2024-05-13 10:17:15 +00:00
Hubert Boma Manilla 5d85945437 Bug 1889276 - [devtools] Fix editor scrolling in codemirror 6 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D202125
2024-05-07 23:53:33 +00:00
Hubert Boma Manilla 235f6fbf11 Bug 1889277 - [devtools] Highlight selected lines of code for codemirror 6 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D209138
2024-05-05 13:11:04 +00:00
Hubert Boma Manilla 8ae9dd40fc Bug 1889277 - [devtools] Highlighting line on selection in code mirror 6 r=devtools-reviewers,nchevobbe
Note: While testing you might notice there is no scrolling, this is being fixed in D202125

Differential Revision: https://phabricator.services.mozilla.com/D205070
2024-05-05 13:11:04 +00:00
Hubert Boma Manilla cfc1737fd0 Bug 1889283 - [devtools] Add support for inline previews r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D208267
2024-05-05 13:11:03 +00:00
Hubert Boma Manilla 1d8c45e062 Bug 1894379 - [devtools] Make sure empty line markers are rendered on initial load r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D209072
2024-05-05 13:07:18 +00:00
Nicolas Chevobbe 1ba466a342 Bug 1892459 - [devtools] Add textInput in event listener breakpoints panel. r=devtools-reviewers,bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D208857
2024-05-02 04:58:51 +00:00
Hubert Boma Manilla c66148a707 Bug 1887649 - [devtools] Show the conditional/log breakpoint panel in codemirror 6 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D205578
2024-04-30 22:15:17 +00:00
Tamas Szentpeteri dac2560d0e Backed out changeset c18051672452 (bug 1887649) for causing dt failures in browser_dbg-breakpoints-cond-ui-state.js. CLOSED TREE 2024-04-30 09:43:05 +03:00
Hubert Boma Manilla 976b715f39 Bug 1887649 - [devtools] Show the conditional/log breakpoint panel in codemirror 6 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D205578
2024-04-30 05:57:42 +00:00
Nicolas Chevobbe 381641953c Bug 1891681 - [devtools] Consider elements not in a CodeMirror line invalid mouse over target. r=devtools-reviewers,bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D208490
2024-04-29 11:46:25 +00:00
Alexandre Poirot 424ff91ac8 Bug 1892905 - [devtools] Ensure tracing DOM Events for same-process iframe. r=devtools-reviewers,nchevobbe
The previous patch explicitly prevents spawning JavaScriptTracer for same-process iframe,
as the JavaScriptTracer can only be spawn once per thread.
But then the JavaScriptTracer should ensure tracking DOM Events for these same-process iframe globals.
`DebuggerNotificationObserver` requires to connect to each individual WindowGlobal.
Connecting to the top WindowGlobal isn't enough to receive DOM Events for children WindowGlobals.

Differential Revision: https://phabricator.services.mozilla.com/D208468
2024-04-25 11:26:23 +00:00
Hubert Boma Manilla 3e437ed282 Bug 1888864 - [devtools] Add click and context menu event listeners for the editor content r=devtools-reviewers,nchevobbe
With this patch the context menu for the editor should be visible

Differential Revision: https://phabricator.services.mozilla.com/D206291
2024-04-22 11:56:39 +00:00
Alexandre Poirot 6afb7bd003 Bug 1891699 - [devtools] Remove unused sourceMapURL React component property. r=devtools-reviewers,nchevobbe
This could possibly throw if sourceActor was null, and wasn't used.

Differential Revision: https://phabricator.services.mozilla.com/D207711
2024-04-17 13:54:27 +00:00
Hubert Boma Manilla 2dbbfbae6b Bug 1824109 - [devtools] Make sure the paused task is resumed before exiting r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D207088
2024-04-11 01:12:49 +00:00
Alexandre Poirot 6c428aaabd Bug 1866814 - [devtools] Merge all DevTools JS Actors into a single DOM Process JS Actor. r=devtools-reviewers,nchevobbe
* The formers JSWindow Actors used independently to create Target Actor for WindowGlobals, Web workers and Service workers
  are all unified behind a single JSProcess Actor pair which was only used to create target actors for DOM Content Processes.
* The DevToolsProcess JSProcess actor now actively monitor the currently watched target types
  in order to start and stop listeners specific to each target type.
  We no longer rely on JSWindow Actors to observe WindowGlobal instantiations.

* `watchedByDevTools` is now consistantly set from each WindowGlobal's content process, via the WindowGlobalTargetActor.
  With the new setup, the parent process no longer track WindowGlobal/BrowsingContext's and so there is no
  natural place to flag them. While, in the content process, the target actor is an obvious place.
  There is just one trick in window global target watcher in order to also set this flag on initial about blank documents.

* `browser-element-host` Session Data is now slightly more simple. It works like any other similar session data attribute.
  But we have to ignore any pending exception coming up from updateDomainSessionDataForServiceWorkers call as that be still pending
  while the toolbox closes, which make the JS Process Actor be unregistered,
  and ultimately make the underlying sendQuery promise be rejected.
* The `loader` is made specific to each Watcher/connection and put in the connections map,
  so that we can better support content toolbox & browser toolbox usecases
  and we have a unique place to define the loader per watcher/connection.

* browser_target_command_detach.js: detach is no longer enough. It wouldn't stop watching and prevent the re-instantiation
  of the target actor. We now have to stop watching for targets. This actually better match what happens on toolbox closing.
  This test was meant as a unit test for covering remote debugging reusing the same DevToolsClient for debugger the same tab.
* `browser_toolbox_watchedByDevTools`. The management of watchedByDevTools is now driven from the content process.
  And because the DevTools Server and especially the watcher actor is destroyed without an explicit RDP request
  that the toolbox destruction is waiting for, we can't rely on closeToolbox to know
  when the server is fully cleaned up.

Differential Revision: https://phabricator.services.mozilla.com/D203409
2024-04-02 08:54:51 +00:00
Alexandre Poirot d7f3cddc7f Bug 1888171 - [devtools] Convert Browser Loader to ESM. r=profiler-reviewers,devtools-reviewers,nchevobbe,julienw
Differential Revision: https://phabricator.services.mozilla.com/D205867
2024-03-28 15:15:24 +00:00
Cristian Tuns db7b2a330c Backed out 3 changesets (bug 1866814) for causing bc failures browser_ext_devtools_inspectedWindow_targetSwitch.js CLOSED TREE
Backed out changeset 5d59dd808307 (bug 1866814)
Backed out changeset f503f5d02d1e (bug 1866814)
Backed out changeset d27f783be149 (bug 1866814)
2024-03-28 08:37:11 -04:00
Alexandre Poirot ee299a8d02 Bug 1866814 - [devtools] Merge all DevTools JS Actors into a single DOM Process JS Actor. r=devtools-reviewers,nchevobbe
* The formers JSWindow Actors used independently to create Target Actor for WindowGlobals, Web workers and Service workers
  are all unified behind a single JSProcess Actor pair which was only used to create target actors for DOM Content Processes.
* The DevToolsProcess JSProcess actor now actively monitor the currently watched target types
  in order to start and stop listeners specific to each target type.
  We no longer rely on JSWindow Actors to observe WindowGlobal instantiations.

* `watchedByDevTools` is now consistantly set from each WindowGlobal's content process, via the WindowGlobalTargetActor.
  With the new setup, the parent process no longer track WindowGlobal/BrowsingContext's and so there is no
  natural place to flag them. While, in the content process, the target actor is an obvious place.
  There is just one trick in window global target watcher in order to also set this flag on initial about blank documents.

* `browser-element-host` Session Data is now slightly more simple. It works like any other similar session data attribute.
  But we have to ignore any pending exception coming up from updateDomainSessionDataForServiceWorkers call as that be still pending
  while the toolbox closes, which make the JS Process Actor be unregistered,
  and ultimately make the underlying sendQuery promise be rejected.
* The `loader` is made specific to each Watcher/connection and put in the connections map,
  so that we can better support content toolbox & browser toolbox usecases
  and we have a unique place to define the loader per watcher/connection.

* browser_target_command_detach.js: detach is no longer enough. It wouldn't stop watching and prevent the re-instantiation
  of the target actor. We now have to stop watching for targets. This actually better match what happens on toolbox closing.
  This test was meant as a unit test for covering remote debugging reusing the same DevToolsClient for debugger the same tab.
* `browser_toolbox_watchedByDevTools`. The management of watchedByDevTools is now driven from the content process.
  And because the DevTools Server and especially the watcher actor is destroyed without an explicit RDP request
  that the toolbox destruction is waiting for, we can't rely on closeToolbox to know
  when the server is fully cleaned up.

Differential Revision: https://phabricator.services.mozilla.com/D203409
2024-03-28 10:47:17 +00:00
Norisz Fay 8b02ae61da Backed out 2 changesets (bug 1887872) for causing dt failures on browser_dbg-old-breakpoint.js CLOSED TREE
Backed out changeset b32b818f2175 (bug 1887872)
Backed out changeset 705494857aed (bug 1887872)
2024-03-27 21:22:10 +02:00
Alexandre Poirot a8382fe8a1 Bug 1887872 - [devtools] Set event breakpoints on toolbox opening. r=devtools-reviewers,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D205773
2024-03-27 17:04:34 +00:00
Alexandre Poirot 1ec9670095 Bug 1887872 - [devtools] Set breakpoints on toolbox opening. r=devtools-reviewers,devtools-backward-compat-reviewers,bomsy
Register them as soon as we open devtools, instead of waiting for debugger panel opening.
So that breakpoints can work even if we did not open debugger panel yet.
So far, only debugger statement would force the opening of the debugger.

This allows to remove the redundant code from debugger frontend.

Also clarify in this patch that thread-utils exports thread configurations.

Differential Revision: https://phabricator.services.mozilla.com/D205772
2024-03-27 17:04:34 +00:00
artem manushenkov 0c607a8763 Bug 1731635 [devtools] Add option to disable split console r=nchevobbe,fluent-reviewers,devtools-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D204142
2024-03-27 06:34:50 +00:00
Hubert Boma Manilla 34047e8c3a Bug 1886967 - [devtools] Cleanup the API to make more consitent r=devtools-reviewers,nchevobbe
- Added the requirement for a new `id` property to markers passed to the `setLineGutterMarkers` API.
- Changed `gutterLineClassName` to `lineClassName` the API name already indicates that it is the gutter, no need to have gutter in the property name, this also amkes it consistent with `setLineContentMarker`
- Changed `createGutterLineElementNode` to `createLineElementNode` for same reason as above.

Differential Revision: https://phabricator.services.mozilla.com/D205435
2024-03-25 21:56:12 +00:00
Hubert Boma Manilla 52512158d0 Bug 1884651 - [devtools] Render line exception marker r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D205001
2024-03-25 21:56:12 +00:00
Hubert Boma Manilla 19447f120d Bug 1884651 - [devtools] Render blackbox marker for blackboxed line content r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D204926
2024-03-25 21:56:12 +00:00
Hubert Boma Manilla 1f236dbd77 Bug 1884651 - [devtools] Rendering debug lines when paused in code mirror 6 r=devtools-reviewers,nchevobbe
In this patch
- we begin to render debug lines when paused.
- New APIs are added to add and remove line content markers

Differential Revision: https://phabricator.services.mozilla.com/D204243
2024-03-25 21:56:11 +00:00
pstanciu 26e14298bd Backed out 3 changesets (bug 1884651) for causing pause line failures e.g. on browser_dbg-keyboard-shortcuts.js
Backed out changeset 571e7f23a751 (bug 1884651)
Backed out changeset 3c52a12e9f0c (bug 1884651)
Backed out changeset f7201f71c231 (bug 1884651)
2024-03-25 17:18:30 +02:00
Hubert Boma Manilla 017a178876 Bug 1884651 - [devtools] Render line exception marker r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D205001
2024-03-25 13:47:42 +00:00
Hubert Boma Manilla 86a391034e Bug 1884651 - [devtools] Render blackbox marker for blackboxed line content r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D204926
2024-03-25 13:47:42 +00:00
Hubert Boma Manilla 3a4f688073 Bug 1884651 - [devtools] Rendering debug lines when paused in code mirror 6 r=devtools-reviewers,nchevobbe
In this patch
- we begin to render debug lines when paused.
- New APIs are added to add and remove line content markers

Differential Revision: https://phabricator.services.mozilla.com/D204243
2024-03-25 13:47:42 +00:00
Dave Townsend 4ed07cf8f5 Bug 1864896 Remove additional unused function arguments.
Differential Revision: https://phabricator.services.mozilla.com/D205297
2024-03-21 10:35:45 +00:00
Dave Townsend 188a75ae0a Bug 1864896: Enable unused argument lint rule. r=Standard8,perftest-reviewers,geckoview-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,nchevobbe,robwu,sparky,issammani,sgalich,owlish,migration-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D195632
2024-03-21 08:50:00 +00:00
Hubert Boma Manilla 46c298c344 Bug 1882060 - [devtools] Render blackbox lines markers in gutter for codemirror 6 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D204049
2024-03-21 07:48:59 +00:00
Hubert Boma Manilla 88000fd4f6 Bug 1882060 - [devtools] Add line breakpoint classes and display gutter breakpoint markers r=devtools-reviewers,nchevobbe
Highlights
- This fixes gutter breakpoints
- Disabling breakpoints should work

Note:
Log breakpoints & Conditional Breakpoints don't work

Differential Revision: https://phabricator.services.mozilla.com/D203451
2024-03-21 07:48:59 +00:00
Hubert Boma Manilla bbab5fc674 Bug 1882060 - [devtools] Add support for empty lines markers to codemirror 6 r=devtools-reviewers,nchevobbe
In this patch
1) Adds the `setLineGutterMarkers` function to the editor which enables defining gutter markers
the line number gutter component. This also updates the line number gutter when the viewport (visible ranges)
change (This usually happens when the editor is scrolled).

2)The first use of the `setLineGutterMarkers` is for rendering empty lines

Differential Revision: https://phabricator.services.mozilla.com/D202716
2024-03-21 07:48:58 +00:00
Cristina Horotan b537a35df5 Backed out 3 changesets (bug 1882060) for causing dt failures at DOMSecurityMonitor.cpp CLOSED TREE
Backed out changeset 1d39266eb67d (bug 1882060)
Backed out changeset a72df33c8fb6 (bug 1882060)
Backed out changeset 16a6afc63e6c (bug 1882060)
2024-03-20 16:35:03 +02:00
Hubert Boma Manilla 4dfcca4e1f Bug 1882060 - [devtools] Render blackbox lines markers in gutter for codemirror 6 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D204049
2024-03-20 13:08:31 +00:00
Hubert Boma Manilla ede9d94c36 Bug 1882060 - [devtools] Add line breakpoint classes and display gutter breakpoint markers r=devtools-reviewers,nchevobbe
Highlights
- This fixes gutter breakpoints
- Disabling breakpoints should work

Note:
Log breakpoints & Conditional Breakpoints don't work

Differential Revision: https://phabricator.services.mozilla.com/D203451
2024-03-20 13:08:31 +00:00
Hubert Boma Manilla d99a480af2 Bug 1882060 - [devtools] Add support for empty lines markers to codemirror 6 r=devtools-reviewers,nchevobbe
In this patch
1) Adds the `setLineGutterMarkers` function to the editor which enables defining gutter markers
the line number gutter component. This also updates the line number gutter when the viewport (visible ranges)
change (This usually happens when the editor is scrolled).

2)The first use of the `setLineGutterMarkers` is for rendering empty lines

Differential Revision: https://phabricator.services.mozilla.com/D202716
2024-03-20 13:08:30 +00:00