Open Bug 1626647 Opened 5 years ago Updated 2 years ago

[meta] Migrate all LegacyListeners, client side code to a server side implementation

Categories

(DevTools :: General, task)

task

Tracking

(Not tracked)

People

(Reporter: ochameau, Unassigned)

References

(Depends on 2 open bugs, Blocks 1 open bug)

Details

(Keywords: meta)

Bug 1626645 aims at refactoring all frontend codebase in order to start using the ResourceWatcher API.
This was a 100% client-side refactoring, moving existing from panel codebase to the LegacyListener object, within ResourceWatcher module.

But now, we should convert these client side implementations, which were using existing target-scoped actors specific for each resources, into a unique "watch" method.
For example, the console messages were using WebConsoleFront.startListener(["ConsoleAPI"]) and WebConsoleFront.on("consoleAPICall",...). But this should instead call an actor method, most likely on the descriptor or the target, which matches the ResourceWatcher API. So, calling a watchResource method, with the "console-messages" resource-type.

This isn't only an aesthetical change, this is actually important for listening correctly for resources that are created early during the document load. It will help inform the actor codebase about which resources we have to watch for early on, as early as the document starts loading.
In the current state of the codebase, we have various way to notify the server how we care about a given type of resource. startListeners+getCachedMessages+various RDP events for console, getSources+newSource RDP event for thread and so on. It is hard to record a list of all resources we actually care about.
The whole point of the ResourceWatcher API is about that. Unifying the whole codebase regarding how we start, stop and implemement listening for things.

The actual actor implementation and API is still undefined and will be figured out in bug 1620243. A WIP patch is already attached there.

Depends on: 1620243

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: General → Console
Component: Console → General
Depends on: 1642295
Depends on: 1644185
Depends on: 1644186
Depends on: 1644187
Depends on: 1644188
Depends on: 1644190
Depends on: 1644191
Depends on: 1644192
Depends on: 1644193
Depends on: 1644194
Depends on: 1644195
Depends on: 1644196
Depends on: 1644197
Depends on: 1646143
Depends on: 1657101
Depends on: 1663523
Depends on: 1666519
Depends on: 1666528
Depends on: 1666533
Depends on: 1666532
Depends on: 1666534
Depends on: 1666529
Depends on: 1674068
Depends on: 1683139
Depends on: 1710077
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.