Commit Graph
814 Commits
Author SHA1 Message Date
Alexandre Poirot 5b05cf4097 Bug 1916533 - [devtools] Always use native codepath when recording JS traces to the profiler output. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D220936
2024-09-04 11:49:41 +00:00
Henrik Skupin 3a548b37ef Bug 1912237 - [devtools] Remove backward compatibility code for Firefox 131 release. r=devtools-backward-compat-reviewers,devtools-reviewers,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D219877
2024-08-23 17:22:32 +00:00
alexical a0fa98ad19 Bug 1906719 - Output native JS trace to the profiler r=ochameau,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D215933
2024-08-05 15:44:21 +00:00
Alexandre Poirot a441733f0e Bug 1866818 - [devtools] Enable the JS tracer on remote debugging. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
Display a warning message in the tracer sidebar when there could be a backward compat issue.

Differential Revision: https://phabricator.services.mozilla.com/D217745
2024-07-31 12:48:21 +00:00
Alexandre Poirot 4c946b19bd Bug 1885054 - [devtools] Display tracer data in a debugger sidebar. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D204446
2024-07-22 18:49:43 +00:00
Sandor Molnar 0e45f1b380 Backed out changeset b6571a4222fb (bug 1885054) for causing bug 1909068 CLOSED TREE 2024-07-22 18:24:44 +03:00
Alexandre Poirot c2af106622 Bug 1885054 - [devtools] Display tracer data in a debugger sidebar. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D204446
2024-07-18 09:02:06 +00:00
Alexandre Poirot 56f1de2b31 Bug 1873060 - [devtools] Move JS tracer icon to the toolbox level. r=devtools-reviewers,nchevobbe
Also moving the LOG_METHODS from actors to specs so that the frontend
can import them from devtools/shared instead of devtools/server.

Differential Revision: https://phabricator.services.mozilla.com/D215085
2024-07-09 15:19:05 +00:00
Sandor Molnar d22465071b Backed out 5 changesets (bug 1873060, bug 1906291) for causing talos perma failures @ jstracer/jstracer.js CLOSED TREE
Backed out changeset 6f0fa044aa35 (bug 1906291)
Backed out changeset 53b5ad4055ed (bug 1906291)
Backed out changeset d72f48618f38 (bug 1906291)
Backed out changeset 17873318ca4a (bug 1906291)
Backed out changeset f3c126a6f60b (bug 1873060)
2024-07-09 02:50:07 +03:00
Alexandre Poirot ca845feadc Bug 1873060 - [devtools] Move JS tracer icon to the toolbox level. r=devtools-reviewers,nchevobbe
Also moving the LOG_METHODS from actors to specs so that the frontend
can import them from devtools/shared instead of devtools/server.

Differential Revision: https://phabricator.services.mozilla.com/D215085
2024-07-08 13:10:39 +00:00
Alexandre Poirot 077d52cc17 Bug 1901643 - [devtools] Gather resources in arrays in order to prevent having to pass the resource type everytime. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D213224
2024-06-18 18:33:18 +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 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
Nicolas Chevobbe 3b3ec982d3 Bug 1881443 - [devtools] Lookup node from idref attribute within node rootNode. r=devtools-reviewers,devtools-backward-compat-reviewers,ochameau,bomsy.
In order to select elements referenced in idref/idreflist attributes,
we were querying the whole node document.
This is incorrect as id reference are scipes within a shadow root.
To fix this, we add a dedicated walker method to retrieve the referenced
node within the base node rootNode.
A test case is added to ensure we don't regress.

Differential Revision: https://phabricator.services.mozilla.com/D202451
2024-02-27 13:54:00 +00:00
Alexandre Poirot 2f676c75ba Bug 1876297 - [devtools] Only force overiding local scope variables for frontend commands relying on console commands. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
We should probably expose new RDP methods to prevent relying on console evaluations for this.
We would still have some potential issues if the evaluated method is about a JS symbol
whose name is the console command.

Differential Revision: https://phabricator.services.mozilla.com/D200167
2024-02-02 12:41:00 +00:00
Alexandre Poirot dfe6db9977 Bug 1848159 - [devtools] Introduce an option to start tracing on next page load. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
Because the JavaScript tracer is currently running in each process/thread/target actor independently,
it is more complex to make it record across navigations as it may be spawn in a distinct process.

While it is fine for stdout and webconsole outputs (we could just spawn many concurrent tracers in each process),
this is more complex for the experimental "profiler" output.
For now, the profiler output automatically stops on target destruction and will open the profiler result.

By having an option to start recording on next page load, it prevents starting the tracer and prevent logging traces
for the current WindowGlobal. It should help focus on the new document.
For the profiler output, it prevents having the profiler to show up for the previous WindowGlobal.

Sideby tweak:
* stop passing logMethod and consider, like other option to be coming from the preferences.
* fix confusing state when debugging a page running in the same process.

Differential Revision: https://phabricator.services.mozilla.com/D196874
2024-01-30 20:18:51 +00:00
Alexandre Poirot 75fcbff4a7 Bug 1875045 - [devtools] Release Object actors by bulk. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
For now we were releasing object actors one by one.
This would force to send an individual RDP request for each of them.
The console often release all objects actors related to older console message
going over the maximum limit of displayed console messages (10k).
This can easily grow in a large number of actors to be released,
either if console message are receiving many arguments and/or
if many console are logged.

We have to have one request per target as the actors could only be reached
within same-thread actor.
In order to prepare for ObjectFront removal, introduce a target-scoped "Objects" actor
which is a singleton per Target. It will receive the new "release in bulk objects actors"
method. Later, it will start implementing all the existing methods of the Object Actor
in order to migrate away from having to instantiate one Object Front (notice the singular on "Object"),
per inspected JS Object.

On the fronted side a new Object Command is introduced in order to abstract away the RDP/Fronts work.

Differential Revision: https://phabricator.services.mozilla.com/D198784
2024-01-29 13:59:51 +00:00
Iulian Moraru f78b22948f Backed out 2 changesets (bug 1875045) for causing dt failures on browser_webconsole_console_logging_workers_api.js. CLOSED TREE
Backed out changeset 533ecc686bac (bug 1875045)
Backed out changeset f4ac089ead5a (bug 1875045)
2024-01-26 16:09:31 +02:00
Alexandre Poirot 3574d88b24 Bug 1875045 - [devtools] Release Object actors by bulk. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
For now we were releasing object actors one by one.
This would force to send an individual RDP request for each of them.
The console often release all objects actors related to older console message
going over the maximum limit of displayed console messages (10k).
This can easily grow in a large number of actors to be released,
either if console message are receiving many arguments and/or
if many console are logged.

We have to have one request per target as the actors could only be reached
within same-thread actor.
In order to prepare for ObjectFront removal, introduce a target-scoped "Objects" actor
which is a singleton per Target. It will receive the new "release in bulk objects actors"
method. Later, it will start implementing all the existing methods of the Object Actor
in order to migrate away from having to instantiate one Object Front (notice the singular on "Object"),
per inspected JS Object.

On the fronted side a new Object Command is introduced in order to abstract away the RDP/Fronts work.

Differential Revision: https://phabricator.services.mozilla.com/D198784
2024-01-26 10:41:43 +00:00
Alexandre Poirot b302044e8b Bug 1835614 - [devtools] Log function call arguments. r=devtools-reviewers,fluent-reviewers,devtools-backward-compat-reviewers,nchevobbe
Introduce a new global option in the tracer to log values.

For now, it only triggers javascript function call arguments to be logged,
but this will also impact the incoming feature logging native function calls,
and also the other incoming feature to log the returned values.

Differential Revision: https://phabricator.services.mozilla.com/D196019
2023-12-19 18:01:52 +00:00
Narcis Beleuzu 54a3764889 Backed out 2 changesets (bug 1835614) for xpcshell failure on test_tracer.js . CLOSED TREE
Backed out changeset 4501d1fb176a (bug 1835614)
Backed out changeset 60b933696a41 (bug 1835614)
2023-12-19 12:54:32 +02:00
Alexandre Poirot 99c1429105 Bug 1835614 - [devtools] Log function call arguments. r=devtools-reviewers,fluent-reviewers,devtools-backward-compat-reviewers,nchevobbe
Introduce a new global option in the tracer to log values.

For now, it only triggers javascript function call arguments to be logged,
but this will also impact the incoming feature logging native function calls,
and also the other incoming feature to log the returned values.

Differential Revision: https://phabricator.services.mozilla.com/D196019
2023-12-19 09:20:34 +00:00
dylan 44ff1ada13 Bug 1156659 - Added offline network throttling to devtools. r=devtools-reviewers,bomsy,devtools-backward-compat-reviewers
Depends on D187704

Differential Revision: https://phabricator.services.mozilla.com/D187705
2023-10-04 19:42:57 +00:00
Norisz Fay 6ae0ebd216 Backed out 2 changesets (bug 1156659) for causing dt failures on browser_net_throttle.js CLOSED TREE
Backed out changeset af64e5a0109a (bug 1156659)
Backed out changeset 7e9b86bce76b (bug 1156659)
2023-10-02 16:11:21 +03:00
dylan b4d73f6806 Bug 1156659 - Added offline network throttling to devtools. r=devtools-reviewers,bomsy,devtools-backward-compat-reviewers
Depends on D187704

Differential Revision: https://phabricator.services.mozilla.com/D187705
2023-10-02 04:13:43 +00:00
Sandor Molnar b16754676a Backed out 2 changesets (bug 1156659) for causing multiple dt failures on browser_jsterm_evaluation_context_selector_targets_update/browser_jsterm_file_load_save_keyboard_shortcut/browser_jsterm_focus_reload/etc CLOSED TREE
Backed out changeset 72676017aaf3 (bug 1156659)
Backed out changeset c5e205051938 (bug 1156659)
2023-09-26 19:54:00 +03:00
dylan 542645bfef Bug 1156659 - Added offline network throttling to devtools. r=devtools-reviewers,bomsy,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D187705
2023-09-26 15:33:34 +00:00
Henrik Skupin 5396ab72fb Bug 1852526 - [devtools] Remove "domstyleruleOrActorid" type. r=devtools-backward-compat-reviewers,devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D187894
2023-09-12 08:45:44 +00:00
Nicolas Chevobbe e736bed306 Bug 1845730 - [devtools] Don't return rules from PageStyleActor#getApplied. r=devtools-reviewers,devtools-backward-compat-reviewers,jdescottes.
The property isn't used anywhere, but those objects would still be serialized
(via `form()`) and sent to the client.
Specs are updated to reflect the new situation, and handle backward compatibility.

Differential Revision: https://phabricator.services.mozilla.com/D184728
2023-08-10 14:54:19 +00:00
Alexandre Poirot 70f3c31950 Bug 1835629 - [devtools] Prevent pausing and showing source of any internal devtools evaluation. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
This aligns all features in DevTools frontend currently evaluating some JavaScript code:
console input, eager evaluation, watch expression, log breakpoint, conditional breakpoint, inline preview, preview tooltips,
console "store as global", inspector "store as temp variable", DOM panel "window" retrieval,...

Except the console evaluation input, none of the many features evaluating code should:
* trigger any type of breakpoint via the evaluated code,
* evaluated sources should not be shown in the debugger.

This has been done by adding a `disableBreaks` argument to the web console actor evaluation method.
This mimic CDP's existing argument and disable trigerring any type of breakpoint,
while also avoiding instantiating Debugger.Source for the evaluated source.

Differential Revision: https://phabricator.services.mozilla.com/D180094
2023-06-29 19:41:46 +00:00
Nicolas Chevobbe c8970f1cb2 Bug 1789193 - [devtools] Display container badges in markup view. r=jdescottes,devtools-backward-compat-reviewers,devtools-reviewers.
This is a simple version for now, showing a non-interactive `container` badge
for elements with `container-type` of `size` or `inline-size` (`style` isn't
supported yet).

Differential Revision: https://phabricator.services.mozilla.com/D156567
2023-06-15 08:21:40 +00:00
Nicolas Chevobbe 31b0c66c25 Bug 1834946 - [devtools] MDN compat data url is nullable. r=jdescottes,devtools-backward-compat-reviewers,devtools-reviewers.
The `mdn_url` property in the compatibility data is not always defined,
as some properties are not documented on MDN.
Luckily, there's a `spec_url` property that we can default to in such case,
so we return that from the server, and fall back to this in the compatibility
panel and the compatibility tooltip.

We might still have cases where we don't have any link at all, so in such case,
we don't render a link in the compatibility panel, and we don't show the "Learn more"
link in the compatibility tooltip.

In order to properly check the page the user might be taken to, we move
the `simulateLinkClick` helper to `shared-head.js` and use it in both compatibility
panel and compatibility tooltip assertion helpers.

Some tests are then updated to provide the now missing information that those
helpers expect.

Differential Revision: https://phabricator.services.mozilla.com/D179030
2023-05-26 09:37:49 +00:00
Iulian Moraru 8939f59179 Backed out 2 changesets (bug 1659498, bug 1834946) for causing compatibility related failures. CLOSED TREE
Backed out changeset 655787761ee9 (bug 1659498)
Backed out changeset 00bc160667b0 (bug 1834946)
2023-05-26 11:55:20 +03:00
Nicolas Chevobbe e0a599d4b8 Bug 1834946 - [devtools] MDN compat data url is nullable. r=jdescottes,devtools-backward-compat-reviewers,devtools-reviewers.
The `mdn_url` property in the compatibility data is not always defined,
as some properties are not documented on MDN.
Luckily, there's a `spec_url` property that we can default to in such case,
so we return that from the server, and fall back to this in the compatibility
panel and the compatibility tooltip.

We might still have cases where we don't have any link at all, so in such case,
we don't render a link in the compatibility panel, and we don't show the "Learn more"
link in the compatibility tooltip.

In order to properly check the page the user might be taken to, we move
the `simulateLinkClick` helper to `shared-head.js` and use it in both compatibility
panel and compatibility tooltip assertion helpers.

Some tests are then updated to provide the now missing information that those
helpers expect.

Differential Revision: https://phabricator.services.mozilla.com/D179030
2023-05-26 06:52:29 +00:00
Nicolas Chevobbe 6fec44a4ec Bug 1833617 - [devtools] Batch calls to retrieve rules compatibility issues. r=jdescottes,devtools-backward-compat-reviewers,devtools-reviewers.
Previously, we were calling `getCssDeclarationBlockIssues` for each dom rule.
This was causing performance issue when displaying a lot of rules as we'd make
almost concurrent RDP calls.

In this patch, we make `CompatibilityActor#getCssDeclarationBlockIssues` take
an array of dom rule declarations, so we can get the data for multiple rules at once.

From the client, we add a method to the inspector command, that will batch calls
to the RDP method.

`compatibility-user-settings.js` is moved to `devtools/shared` so it can safely
be loaded from the command.

Differential Revision: https://phabricator.services.mozilla.com/D178313
2023-05-25 07:44:21 +00:00
Emilio Cobos Álvarez 6871ba033a Bug 1825825 - Remove unused whatToShow option from devtools inspector walker. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
It's always SHOW_ALL, and it doesn't work anyways, see the treewalker impl.

Differential Revision: https://phabricator.services.mozilla.com/D174490
2023-04-04 08:56:37 +00:00
William Durand d8f150ae4f Bug 1823457 - Expose uninstallAddon method on addons actor. r=jdescottes,devtools-backward-compat-reviewers,devtools-reviewers
Depends on D173053

Differential Revision: https://phabricator.services.mozilla.com/D173126
2023-03-23 11:43:13 +00:00
Nicolas Chevobbe 0083a5d3ba Bug 1823616 - [devtools] release tasks cycle 113 - Remove backward compatibility code. r=devtools-reviewers,devtools-backward-compat-reviewers,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D173121
2023-03-22 14:50:22 +00:00
Alexandre Poirot 187a45e360 Bug 1803616 - [devtools] Implement a Javascript Tracer in the debugger. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
On the server side, this patch introduces:
* a new "tracer" Target Scope actor to start and stop tracing per target
* a new TRACING_STATE resource in order to report to the client when we start/stop tracing and with which log method.

On the frontend side, this patch introduces:
* a global tracer button, which will enable/disable tracing for all targets/threads
  all at once.
* a global header, similar to pause, reporting if any target is tracing or not.
The header reuses the pause header and we may want to followup to better coordinate case
where we pause and trace at the same time. Only one of the two states is displayed.

We may want to followup here to be able to trace only one target and see the state per target.

Differential Revision: https://phabricator.services.mozilla.com/D163614
2023-03-14 17:17:05 +00:00
Hubert Boma Manilla 4805d64da4 Bug 1820737 - [devtools] Remove backward compatibility for lastPrivateContextExited r=devtools-reviewers,devtools-backward-compat-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D171844
2023-03-07 15:14:53 +00:00
Hubert Boma Manilla 0eaa096c8d Bug 1820737 - [devtools] Remove backward compatibility code related to isBrowserToolboxFission r=devtools-reviewers,devtools-backward-compat-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D171843
2023-03-07 15:14:53 +00:00
Nicolas Chevobbe dd68818621 Bug 1818687 - [devtools] Remove getBreakpointPositions from SourceActor spec. r=devtools-backward-compat-reviewers,devtools-reviewers,bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D170850
2023-02-28 11:08:51 +00:00
Alexandre Poirot 4ec2cf1ced Bug 1704690 - [devtools] Allow overriding request content with a local file. r=valentin,devtools-backward-compat-reviewers,bomsy,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D163600
2023-02-24 12:11:28 +00:00
Dennis Jackson 81528fe222 Bug 1804460 - Add detailed connection info to WebRequest GetSecurityInfo API. r=keeler,devtools-backward-compat-reviewers,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D164092
2023-02-14 17:24:46 +00:00
Alexandre Poirot dd2ec2e844 Bug 1814013 - [devtools] Remove test-only echo request from the root actor. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
This wasn't so trivial to revisit tests, but at least we stop shipping test-only
features in RDP. And the cryptic echo implement now only exists in tests.

Differential Revision: https://phabricator.services.mozilla.com/D168360
2023-02-07 10:36:59 +00:00
Julian Descottes 54db0bba91 Bug 1811138 - [devtools] Move ensureCSSErrorReportingEnabled to the CSS_MESSAGE watcher r=ochameau,perftest-reviewers,sparky,devtools-backward-compat-reviewers
We can also remove the legacy listener, as it is only ever triggered by worker toolboxes.

Differential Revision: https://phabricator.services.mozilla.com/D167211
2023-02-06 09:47:17 +00:00
Nicolas Chevobbe bd7496a40a Bug 1812521 - [devtools] Don't rely on custom formatter index for body hook. r=ochameau.
Instead of keeping track of an index, store the formatter entry in
the object actor from `customFormatterHeader` so we can re-use it
in `customFormatterBody`.

Differential Revision: https://phabricator.services.mozilla.com/D167905
2023-02-03 14:02:46 +00:00
Julian Descottes c571082be0 Bug 1814086 - [devtools] Enable ServerSentEvent resource for all sessions r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
Depends on D168437

Differential Revision: https://phabricator.services.mozilla.com/D168438
2023-02-02 20:53:56 +00:00
Julian Descottes 63a5ac71f4 Bug 1814086 - [devtools] Enable WebSocket resource for all sessions r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
Depends on D168436

Differential Revision: https://phabricator.services.mozilla.com/D168437
2023-02-02 20:53:55 +00:00
Alexandre Poirot d2d3164246 Bug 1810095 - [devtools] Remove now-unused Storage target scoped actor. r=devtools-reviewers,devtools-backward-compat-reviewers,jdescottes
This actor was only used by the legacy listener.
Its main method was listStores which exposed all the storage type actors.
Now they are exposed via storage Resource watchers.

This requires to tweak the decision making to show the storage panel
as the actor no longer exists... Unfortunately we can't check for
resource traits on the watcher actor as the browser toolbox
on older runtime won't expose it.

Note that this.front wasn't used for a little while in ui.js.

I had to keep a few things in the frontend in order to still be able
to connect to old servers. But I put lots of comments to do proper cleanup later.

Differential Revision: https://phabricator.services.mozilla.com/D166770
2023-01-29 20:50:48 +00:00