Use the ResourceWatcher API to fetch Network Event
Categories
(DevTools :: Netmonitor, enhancement, P1)
Tracking
(Fission Milestone:M6c, firefox80 fixed)
| Tracking | Status | |
|---|---|---|
| firefox80 | --- | fixed |
People
(Reporter: ochameau, Assigned: bomsy)
References
(Blocks 4 open bugs)
Details
(Whiteboard: dt-fission-m2-mvp)
Attachments
(1 file)
Bug 1576624 introduced the ResourceWatcher API, accessible via toolbox.resourceWatcher. This API will help listen to data that is being created early, when the document just started loading.
We should migrate the whole DevTools codebase to this API for any data that:
- DevTools frontend listen to, or care about,
and, - may be created or be notified early, when the document just starts being loaded.
This data will typically be: console messages, errors, warnings, sources, Root element NodeFront, storage values, network events, stylesheets, ...
We are typically not going to use this API for:
- data being fetched on-demand, from user's input. For ex: webconsole evaluation input, or, DOM element expands from the Markup view.
- events which we only want to record when the user cares about them. For ex: animation events.
For some more high level context, please have a look at Migration to Fission-compatible APIs, which describes all Fission-related refactorings.
The typical task for this bug will be about migrating code that:
- start listening and register a RDP event listener,
- retrieve already existings data,
from panel's codebase, to theResourceWatchermodule, in theLegacyListenerobject.
And then, the panel should use theResourceWatcherinstead.
Bug 1620234 is a good example of such migration, applied to Console Messages.
Bug 1623699 is also useful example as it demonstrates how to write tests for such migration.
This bug is about focusing on only one usecase in the netmonitor and console: the Network Events.
This bug may be split in multiple sub tasks as network events are:
- used by both console and netmonitor
- is slightly more complex than any other resource as there is two RDP events
networkEventandnetworkEventUpdate
It isn't clear how the existing ResourceWatcher API will comply to existing netmonitor expectations... We might tweak the ResourceWatcher to help the migration.
Network Events are currently being listened via WebConsoleFront.startListeners(["NetworkActivity"]), from here:
- web console
https://searchfox.org/mozilla-central/source/devtools/client/webconsole/webconsole-connection-proxy.js#264-292
https://searchfox.org/mozilla-central/source/devtools/client/webconsole/webconsole-connection-proxy.js#123-131 - network monitor panel
https://searchfox.org/mozilla-central/rev/9c6e7500c0015a2c60be7b1b888261d95095ce27/devtools/client/netmonitor/initializer.js#85
https://searchfox.org/mozilla-central/rev/9c6e7500c0015a2c60be7b1b888261d95095ce27/devtools/client/netmonitor/src/connector/firefox-connector.js#149-153 - har collector
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/src/har/har-collector.js#39-40
| Reporter | ||
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Tracking Fission DevTools bugs for Fission Nightly (M6) milestone
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
| Assignee | ||
Comment 2•6 years ago
|
||
This is a WIP patch, needs to be rebased over D69329 when it is done.
Updated•6 years ago
|
Comment 3•6 years ago
|
||
Tracking dt-fission-m2-mvp bugs for Fission Nightly milestone (M6c)
Comment 6•5 years ago
|
||
Backed out changeset e95324121fde (Bug 1625909) for causing multiple devtool failures.
Backout link: https://hg.mozilla.org/integration/autoland/rev/199f7ed2419f91f09a853076292f88d953f58ae2
Failure logs:
Comment 7•5 years ago
|
||
Also seeing bc failures on browser_ext_devtools_network.js:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&resultStatus=pending%2Crunning%2Csuccess%2Ctestfailed%2Cbusted%2Cexception%2Crunnable&fromchange=9f7c95cb5aacee7841bdca487a789ccf675a0994&searchStr=windows%2C7%2Cdebug%2Cmochitests%2Ctest-windows7-32%2Fdebug-mochitest-browser-chrome-e10s-7%2Cm%28bc7%29&tochange=199f7ed2419f91f09a853076292f88d953f58ae2
| Assignee | ||
Updated•5 years ago
|
Comment 9•5 years ago
|
||
| bugherder | ||
Description
•