Merge or cleanup ConsoleAPIListener into devtools/server/actors/resources/console-messages.js
Categories
(DevTools :: Console, task, P3)
Tracking
(Fission Milestone:Future)
| Fission Milestone | Future |
People
(Reporter: ochameau, Unassigned)
References
(Depends on 1 open bug)
Details
(Whiteboard: dt-fission-future)
Bug 1620243 introduce a new codepath for listening to console message.
We now listen for console messages via devtools/server/actors/resources/console-messages.js module, instead of the WebConsoleActor.
This new module reused ConsoleAPIListener as-is:
https://searchfox.org/mozilla-central/source/devtools/server/actors/webconsole/listeners/console-api.js
But we could probably:
- merge it into this new module,
- and/or, at least tweak a few things in order to remove legacy code and better align to the ResourceWatcher/WatcherActor APIs.
Note that if we don't merge the two files, we may better wait for bug 1642296.
Otherwise we would still have the WebConsoleActor using this module and may require some unecessary maintenance of it.
| Reporter | ||
Comment 1•5 years ago
•
|
||
In term of legacy and merge opportunities, we can probably:
- Stop passing an
ownerobject and pass a function. Or mergeConsoleAPIListenerintoconsole-messages.js? - Merge filtering around service workers currently done from the
console-messages.jsmodule into theConsoleAPIListenerfunction? - Review ConsoleAPIListener.getCachedMessage as it may create unecessary copies of list of messages when using functional style array methods.
- Review
prepareConsoleMessageForRemoteand all itsdelete this.xxxxxxxcalls. This may be pure legacy. - Review the call to
target.attach(). We do that in order to ensure that thethreadActoris instantiated. This is being used viaprepareConsoleMessageForRemote>TabSources.getActorIdForInternalSourceId. We should ensure that having a thread actor is a real requirement. If it is, may be try to only instantiate it instead of attaching the target. About that, we should probably coordinate with bug 1641121.
Comment 2•5 years ago
|
||
Tracking dt-fission-m2-reserve bugs for Fission Beta milestone (M7).
Comment 3•5 years ago
|
||
Bulk move of all dt-fission-m2-reserve bugs to Fission MVP milestone.
Updated•5 years ago
|
Comment 4•5 years ago
|
||
Moving "dt-fission-m3-reserve" bugs to "dt-fission-future" because they don't block Fission MVP.
Updated•5 months ago
|
Description
•