These preferences ended up being specifics to network observation.
The only one lastly supported is now set via NetworkParentActor.setSaveRequestAndResponseBodies.
Differential Revision: https://phabricator.services.mozilla.com/D165864
With the removal of the old non-fission browser toolbox,
we removed the last usage of this old codebase.
We used to be able to listen to network events via WebConsole's actor's startListeners method.
Nowadays we should rather use the Watcher actor's watchResources method and listen to
NETWORK_EVENT resource.
(or migrate to WebDriver Bidi which will soon allow to listen to network requests see bug 1790369)
This patch also removed all now unused block* requests from webconsole actor,
Differential Revision: https://phabricator.services.mozilla.com/D165603
`WebConsoleConnectionProxy` is now only used for:
- listening to `lastPrivateContextExited`, which can be done from the top-level
console front instead
- setting `NetworkMonitor.saveRequestAndResponseBodies` for toolbox we don't have
network resource support for, which would be better done in `startWatchingNetworkResources`.
This means we don't need to keep a Map of additional proxies.
The only impact is on `clearMessagesCache`, where we now fetch all fronts with
`getAllFronts` instead of looping through the Map of additional proxies.
This change highlighted some race condition in tests, as it's now slightly slower.
So we add a new `clearMessagesCacheAsync` function, which is doing the same thing
as `clearMessagesCache`, except it's not `oneway`, so we can know when the cache
was indeed cleared, and we emit an event to indicate when the cache was cleared.
We can't simply remove `oneway` from `clearMessagesCache` as it causes backward
compatibility issues we can't avoid.
This also highlighted an issue with the cache not being cleared on `console.clear`
when it is batched, so we fix this (a test was failing without it).
The next patch in the queue will completely remove `WebConsoleConnectionProxy`.
Differential Revision: https://phabricator.services.mozilla.com/D150085
Otherwise, the warning is displayed:
```
WARNING: Could not lex literal_block as "json". Highlighting skipped.
```
Depends on D131092
Differential Revision: https://phabricator.services.mozilla.com/D131093