[meta] Migrate all LegacyListeners, client side code to a server side implementation
Categories
(DevTools :: General, 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.
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Updated•5 years ago
|
Updated•2 years ago
|
Description
•