Closed Bug 1721592 Opened 3 years ago Closed 2 years ago

Remove spawnActorInParentProcess + WebConsoleActor.startListeners([NetworkActivity])

Categories

(DevTools :: Console, task)

task

Tracking

(firefox110 fixed)

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(4 files, 3 obsolete files)

spawnActorInParentProcess + spawnInParent are both broken as soon as we enable server side target (bug 1698891).
We keep testing this by disable the server side target pref, but it would be nice to remove this old code still using message managers.

VsCode adapter isn't using NetworkActivity, but may be some external RDP tooling are listening to network events via the console.

We should probably communicate about the new API and the upcoming breakages before removing a bunch of very old and basic APIs like network interception.
We may even sync up with WebDriver progress in order to suggest using the WebDriver API if available.

See bug 1642296 which is about removing the rest of this method and console log listening via the console actor.

Within mozilla-central, WebConsoleActor.startListeners(["NetworkActivity"]) is being used by:

The responsive actor usage, coming from RDM network throtling feature may need to be rewritten in order to communicate with the NetworkObserver of the NetworkEventWatcher running in the parent process.
The legay listener usage should hopefully get away once we enable the MBT on all channels (bug 1625937). And may be also once we enable the watcher on all toolboxes (bug 1675763).

Depends on: 1689459

This code is not compatible with Fission and is no longer used by DevTools.
RDP client should now use: WatcherActor.watchResources("network-event") request
and listen to WatcherActor.resource-available-form events.

This was only used by the former NetMonitorActor, which was removed in previous changeset.

Unfortunately, the dependency on bug 1625937 still stands. So we can't remove all this code just yet.
But at least we have a good picture of how much code we could soon remove!

This is no longer used by DevTools. RDP client should now rely on NetworkParentActor's equivalent requests.
This actor can be retrieved via the WatcherActor.

Note that we should also be able to remove the legacyMatchRequest from devtools/server/actors/network-monitor/utils/network-utils.js.

Blocks: 1687459
Depends on: 1625937
No longer blocks: 1687459
Duplicate of this bug: 1807650
Attachment #9255726 - Attachment is obsolete: true
Attachment #9255727 - Attachment is obsolete: true
Attachment #9255728 - Attachment is obsolete: true

Now that the old non-fission browser toolbox has been removed,
we no longer use the old codepath going through the web console actor.
We can now use a single codepath for network observable
and followup by removing the now unused server bits.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED

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,

This was only used by legacy netmonitor class.

This required a small workaround in ResourceCommand in order to avoid
trying to spawn network event legacy listeners for workers.
The old legacy listener were bailing out for workers...

Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d4bdcc85251d [devtools] Always use the watcher/ResourceCommand to listen for network events. r=devtools-reviewers,jdescottes https://hg.mozilla.org/integration/autoland/rev/a1d57b3aafbd [devtools] Remove old server codebase to listen to network events. r=devtools-reviewers,devtools-backward-compat-reviewers,jdescottes https://hg.mozilla.org/integration/autoland/rev/53417c1fffcc [devtools] Remove DevToolsServerConnection.spawnActorInParentProcess. r=devtools-reviewers,jdescottes https://hg.mozilla.org/integration/autoland/rev/37403101913e [devtools] Remove network legacy listeners. r=devtools-reviewers,jdescottes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: