Commit Graph
60 Commits
Author SHA1 Message Date
Lorenz A c19da6e773 Bug 1665702 - [devtools] Remove unused idGenerator argument of networkMessageUpdates action method. r=devtools-reviewers,nchevobbe
Seems like `idGenerator` was added to mirror messagesAdd but was never used

Differential Revision: https://phabricator.services.mozilla.com/D274645
2025-12-02 07:57:47 +00:00
Nicolas Chevobbe f70676c645 Bug 1615206 - [devtools] Make the "Group similar message" setting control repeating messages. r=devtools-reviewers,ochameau
The existing setting was added to control grouping similar warning messages.
Due to the wording of the setting, users were also thinking it could control
repeated messages (the small badge/bubble we put next to messages when successibe
messages have the same text).
This patch renames the warning group pref into something that can drive both of
these, and we make the repeat mechanism check the value of the pref befor repeating.

Note that for repeated message, unlike warning groups, this doesn't "ungroup"
the messages, but that should be fine like this.

A node test case is added, as well as a mochitest (event though the test was already
checking repeated messages in a specific context, it's still nice to have
some basic actual coverage)

Differential Revision: https://phabricator.services.mozilla.com/D257841
2025-07-22 08:55:54 +00:00
Hubert Boma Manilla fc5a8ad266 Bug 1557795 - [devtools] Start triggering multiple network events updates r=devtools-reviewers,jdescottes
Lets start triggering updates at certain keypoint in the cycle instead
batching into one update at the end.
This should depend on mechanisim for throttling resources so as not to spam the
frontend with lots of updates

Differential Revision: https://phabricator.services.mozilla.com/D247424
2025-07-01 23:01:47 +00:00
Alexandre Poirot 35e7d6f96b Bug 1929387 - [devtools] Remove other node tests involving reps. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D230121
2025-03-05 17:05:57 +00:00
Nicolas Chevobbe ace5751aaf Bug 1926075 - [devtools] Don't repeat Symbols with different names in console. r=devtools-reviewers,bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D226438
2024-10-22 14:11:06 +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
Alexandre Poirot df9fea0485 Bug 1901644 - [devtools] Uncapsulate CONSOLE_MESSAGE resource. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D213225
2024-06-18 18:33:18 +00:00
Alexandre Poirot 9454c9e3e8 Bug 1651518 - [devtools] Ensure waiting for CSS Warning full listening when toggling the filter from tests. r=devtools-reviewers,nchevobbe
The enhancer was brittle as nothing was waiting for its completion.
We should rather do such work from the action layer. At least this can delay the action completion,
which the test header (setFilterState) already wait for.

Differential Revision: https://phabricator.services.mozilla.com/D205602
2024-05-27 09:53:53 +00:00
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 2ca6803e58 Bug 1651518 - [devtools] Ensure waiting for CSS Warning full listening when toggling the filter from tests. r=devtools-reviewers,nchevobbe
The enhancer was brittle as nothing was waiting for its completion.
We should rather do such work from the action layer. At least this can delay the action completion,
which the test header (setFilterState) already wait for.

Differential Revision: https://phabricator.services.mozilla.com/D205602
2024-05-22 11:50:43 +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 77d5f78f48 Bug 1651518 - [devtools] Ensure waiting for CSS Warning full listening when toggling the filter from tests. r=devtools-reviewers,nchevobbe
The enhancer was brittle as nothing was waiting for its completion.
We should rather do such work from the action layer. At least this can delay the action completion,
which the test header (setFilterState) already wait for.

Differential Revision: https://phabricator.services.mozilla.com/D205602
2024-05-21 14:09:33 +00:00
Nicolas Chevobbe 57c4155db4 Bug 1883305 - [devtools] Remove 123 backward compatibility code. r=ochameau,devtools-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D203395
2024-03-04 14:20:53 +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
Katherine Patenio 99d830d71b Bug 1830418 - Convert browser/components/customizableui/CustomizableUI.jsm to ESM r=Standard8,devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D177423
2023-05-24 15:52:34 +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
Nicolas Chevobbe 4cf60bdd90 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
Alexandre Poirot 465fac9684 Bug 1792847 - [devtools] Use absolute URLs to import modules in devtools/client/webconsole. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D158380
2022-09-30 15:17:40 +00:00
Mark Banner 3387a89bc7 Bug 1786197 - Turn on ESLint rule for prefer-boolean-length-check for devtools. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D155167
2022-08-26 13:39:34 +00:00
Mark Banner 6d03c63e2d Bug 1330099 - Enable object-shorthand eslint rule. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D153567
2022-08-03 14:57:05 +00:00
Hubert Boma Manilla d310c72aff Bug 1775058 - [devtools] Functionality to disable webconsole messages r=nchevobbe
This introduces functionality to support disabling weconsole messages.
Also introduces code to disable all network messages, which would be
used by the netmonitor.

You'll probably need the fullstack of patches to test easily

Will add mochitest in a followup

Differential Revision: https://phabricator.services.mozilla.com/D149753
2022-07-04 17:18:50 +00:00
Nicolas Chevobbe f0c6879b4f Bug 1776145 - [devtools] Remove WebConsoleConnectionProxy. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D150087
2022-07-04 13:27:52 +00:00
Nicolas Chevobbe bacc964ac1 Bug 1764501 - [devtools] Speedup adding messages out of order. r=ochameau.
In the console we might receive messages that need to be inserted at a specific
position in the output to respect the chronological order.
This is very visible when evaluating an expression in the console while we are
fetching cached messages, or when the expression is logging lots of messages, since
the evaluation result doesn't go through the ResourceCommand itself.
Since we were relying on the order of insertion in `mutableMessagesById` for the
order of messages in the output, we had no choice but clone the Map to insert
the new message at the specific position.
With lots of messages, this can be utterly slow, and is something people are experiencing.

To fix this, we're adding a new state property, `mutableMessagesOrder`, which holds
message ids in the chronological order. It's then used to compute `visibleMessages`.
As we don't have to clone the Map anymore, it makes reordering as fast as looking
for an index in the array and splicing it (which is fast).

We also take this opportunity to switch away from our `findIndex` usage; most often
than not, the messages will be reinserted at the end of the array, so we can loop
through it backward to find the index faster.

We still keep `mutableMessagesById` as a Map so lookup are fast, and we don't have
to deal with impacts we'd have if we'd switch to an object.

The existing node test helper to get a message at a specific index are migrated
to make use of `mutableMessagesOrder`, and a few test cases and assertions are
added to check that the new property is handled correctly.

Differential Revision: https://phabricator.services.mozilla.com/D148658
2022-06-15 12:57:07 +00:00
Nicolas Chevobbe b2aa9bbb4f Bug 1432343 - [devtools] Mutate messagesById in console redux state. r=ochameau.
The property is renamed, prefixed with `mutable` to better highlight that it is
special; the associated selector is renamed as well.
The only change necessary was adding a `messageCount` prop to the `ConsoleOutput`
component so its lifecycle method could check if the number of messages changed.

Differential Revision: https://phabricator.services.mozilla.com/D138293
2022-02-16 09:03:16 +00:00
Nicolas Chevobbe a1e7221a2f Bug 1754697 - [devtools] Refactor webconsole state management of CSS Warnings matching elements. r=ochameau.
In order to store the matching elements of a CSS warnings, we were having a quite
generic `MESSAGE_UPDATE_PAYLOAD` action and `messagesPayloadById` property in the store.
This was used at some point to also store console.table data (which was retrieved
asynchronously), but is no longer true.
In this patch, we rename the action, property, selector, props and variable that
were using this to make it more specific to the CSS warning matching elements.

We also, directly pass message to messageGetMatchingElements as the component
calling the action already had access to it.

Tests that were using the action are updated so they're about CSS warnings (and
not console.table).

Differential Revision: https://phabricator.services.mozilla.com/D138412
2022-02-16 09:03:15 +00:00
Julian Descottes 9fb3b7cde0 Bug 1733464 - [devtools] Fix webconsole stubs and node tests for https-first r=nchevobbe
It is slightly more complicated than expected because we have an issue capturing 404 from httpd.js in DevTools when using HTTPS (see Bug 1733420).

Therefore the stub for network events, which generates 404 requests, is not using https://example.com but http://mochi.test:8888

Differential Revision: https://phabricator.services.mozilla.com/D127161
2021-10-01 08:42:35 +00:00
Nicolas Chevobbe f794b74d26 Bug 1705697 - [devtools] Warning group messages shouldn't be repeatable. r=bomsy.
It could happen that 2 warning group messages could be added successively, before
the navigation message was emitted.
In the reducer, the second message would be seen the same as the first one, and
we'd try to increment the repeat count for the first one.
Unfortunately, the code was expecting a warning group to be created, and there
was an exception thrown as we couldn't retrieve it.
This is fixed by not allowing warning groups to be repeated.
A mocha test is added instead of a mochitest, as the issue would have been tricky
to trigger properly.

Differential Revision: https://phabricator.services.mozilla.com/D113276
2021-04-28 08:10:13 +00:00
Hubert Boma Manilla d5571b2022 Bug 1687192 - [devtools] Make sure multiple bacth updates with the same id does not override former r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D102117
2021-01-18 17:28:10 +00:00
Noemi Erli 92cbc19731 Backed out 3 changesets (bug 1687205, bug 1687192, bug 1665383) for causing devtools failures in browser_net_block-csp.js CLOSED TREE
Backed out changeset 812caf90c2c5 (bug 1687192)
Backed out changeset 68f676381ab4 (bug 1687205)
Backed out changeset 34dd7e523954 (bug 1665383)
2021-01-18 18:00:02 +02:00
Hubert Boma Manilla c006b58c03 Bug 1687192 - [devtools] Make sure multiple batch updates with the same id does not override former r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D102117
2021-01-18 12:51:20 +00:00
Miguel Roncancio 603596d95d Bug 1440068 - Fix filtering on console groups r=nchevobbe
Bug 1440068 - Fix filtering on console groups.

implement more thorough check of collapsed group messages

expand test suite

Differential Revision: https://phabricator.services.mozilla.com/D91065
2020-10-12 06:41:33 +00:00
Alexandre Poirot 894acbff1d Bug 1665306 - Process "network updates" in console with only one networkUpdateRequest action call. r=jdescottes,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D90394
2020-09-23 11:29:38 +00:00
Alexandre Poirot 3ca2ef785b Bug 1665305 - Process "message network updates" in console with only one networkMessageUpdate action call. r=jdescottes
This help modifying redux state only once and prevent many uncesarry copies of the whole messages/network events Maps.
This will also later help getting rid of WebConsoleWrapper throttling in favor of upcoming ResourceWatcher one,
as we could call only one action from onResourceAvailable/Updated.

Differential Revision: https://phabricator.services.mozilla.com/D90367
2020-09-23 11:29:30 +00:00
Brindusan Cristian de7b844469 Backed out 3 changesets (bug 1665306, bug 1665305, bug 1665293) for dt failures at browser_webconsole_network_attach.js. CLOSED TREE
Backed out changeset 5d5f176f7231 (bug 1665306)
Backed out changeset 241fc01aced8 (bug 1665305)
Backed out changeset 5055331a7b6e (bug 1665293)
2020-09-18 10:40:54 +03:00
Alexandre Poirot 702a19e458 Bug 1665306 - Process "network updates" in console with only one networkUpdateRequest action call. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D90394
2020-09-17 17:51:56 +00:00
Alexandre Poirot 441c5f02b9 Bug 1665305 - Process "message network updates" in console with only one networkMessageUpdate action call. r=jdescottes
This help modifying redux state only once and prevent many uncesarry copies of the whole messages/network events Maps.
This will also later help getting rid of WebConsoleWrapper throttling in favor of upcoming ResourceWatcher one,
as we could call only one action from onResourceAvailable/Updated.

Differential Revision: https://phabricator.services.mozilla.com/D90367
2020-09-17 16:39:27 +00:00
Daisuke Akatsuka 7ca3dd722b Bug 1659589: Get style-applied event via resource watcher. r=ochameau,bomsy
Depends on D87040

Differential Revision: https://phabricator.services.mozilla.com/D87041
2020-08-27 22:31:52 +00:00
Hubert Boma Manilla d28c850b7a Bug 1625909 - Use the ResourceWatcher API to fetch Network Events r=ochameau,Honza,nchevobbe
This patch migrates to using the Resource Watcher API to handle Network events, it adds a legacy listeners for the network events

Differential Revision: https://phabricator.services.mozilla.com/D71543
2020-07-13 13:33:09 +00:00
Mihai Alexandru Michis a651d0db05 Backed out changeset e95324121fde (bug 1625909) for causing multiple devtool failures. 2020-07-13 04:20:41 +03:00
Hubert Boma Manilla 85c8d3f713 Bug 1625909 - Use the ResourceWatcher API to fetch Network Events r=ochameau,Honza,nchevobbe
This patch migrates to using the Resource Watcher API to handle Network events, it adds a legacy listeners for the network events

Differential Revision: https://phabricator.services.mozilla.com/D71543
2020-07-12 20:38:06 +00:00
Nicolas Chevobbe 2eb5dfb708 Bug 1635460 - Show 4XX and 5XX Network requests as errors in the console. r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D77465
2020-06-02 13:31:24 +00:00
Nicolas Chevobbe fec2591e7c Bug 1631799 - Fix order of command and its result message when server and client don't have the same clock time. r=jdescottes.
When remote-debugging a device, it might happen that the device clock
is not exactly at the same time as the client clock. In such case, we
may end up in cases where the result of a command as an older timestamp,
which means we could have in the console output a result that was displayed
before the command message that triggered it.
In order to fix this, we add a `startTime` property on the evaluateJSAsync
response, that we can then check on the client. If the server time is
older than the client time, then we remove the existing command message
and add a new one, with the server timestamp.

We could have waited the result of the command before displaying the
command message (so we don't have to add a message, and then remove it
when the timestamps don't match), but the UI wouldn't feel snappy, and
even worse in case of long execution times (e.g. a top-level await fetch command).

Differential Revision: https://phabricator.services.mozilla.com/D72705
2020-04-30 06:31:14 +00:00
Dorel Luca b1292d772a Backed out changeset 6feb116adffe (bug 1631799) for devtools/client/webconsole/test/browser/browser_webconsole_telemetry_reverse_search.js. CLOSED TREE 2020-04-29 22:33:05 +03:00
Nicolas Chevobbe f0d0f62477 Bug 1631799 - Fix order of command and its result message when server and client don't have the same clock time. r=jdescottes.
When remote-debugging a device, it might happen that the device clock
is not exactly at the same time as the client clock. In such case, we
may end up in cases where the result of a command as an older timestamp,
which means we could have in the console output a result that was displayed
before the command message that triggered it.
In order to fix this, we add a `startTime` property on the evaluateJSAsync
response, that we can then check on the client. If the server time is
older than the client time, then we remove the existing command message
and add a new one, with the server timestamp.

We could have waited the result of the command before displaying the
command message (so we don't have to add a message, and then remove it
when the timestamps don't match), but the UI wouldn't feel snappy, and
even worse in case of long execution times (e.g. a top-level await fetch command).

Differential Revision: https://phabricator.services.mozilla.com/D72705
2020-04-29 17:12:32 +00:00
Nicolas Chevobbe 4c94c7dc60 Bug 1626286 - Assign the same timestamp to all WebConsole stubs. r=Honza.
Since we're going to re-order the packets in the webconsole messages
reducer based on the messages timestamps, the node tests are going
to fail, as stubs timeStamps are generated and we don't have much
control on them.
Assigning the same timestamp means we'll defer to order based on the
message id, which should follow the order of insertion. The only exception
is network messages, where the id needs to be the actor, which is a string.
For the tests that are using network messages and assert some order, we
simply reassign the timestamps so we can guarantee the order.

Differential Revision: https://phabricator.services.mozilla.com/D69966
2020-04-08 13:50:23 +00:00
Mark Banner d375cfec54 Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D65703
2020-03-07 10:09:44 +00:00
Jason Laster fdd5e7fbe2 Bug 1609815 - Remove Web Replay UI. r=loganfsmyth
Differential Revision: https://phabricator.services.mozilla.com/D60679
2020-02-10 21:03:28 +00:00
Noemi Erli b044f76822 Backed out changeset cfe2388a674e (bug 1609815) for causing TypeError in browserContext CLOSED TREE 2020-02-11 00:35:52 +02:00