Use the ResourceWatcher API to fetch Root NodeFront
Categories
(DevTools :: Inspector, task, P2)
Tracking
(Fission Milestone:M6, firefox78 fixed)
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: ochameau, Assigned: jdescottes)
References
(Blocks 1 open bug)
Details
(Whiteboard: dt-fission-m2-mvp)
Attachments
(2 files)
Bug 157662 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 theResourceWatcher
module, in theLegacyListener
object.
And then, the panel should use theResourceWatcher
instead.
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: the root DOM Element NodeFront.
This work depends on bug 1611096, which make the root NodeFront retrieval closer to a what we need here.
Before this work, the root NodeFront was emited via the Walker actor mutations
event, from here:
https://searchfox.org/mozilla-central/source/devtools/server/actors/inspector/walker.js#2511-2514
or, retrieved on initialization or the walker actor from here:
https://searchfox.org/mozilla-central/source/devtools/server/actors/inspector/walker.js#377-387
After this work a new new-root-available
event is fired on the Walker actor and I think we rely on the same code for initialization.
Comment 1•5 years ago
|
||
Tracking Fission DevTools bugs for Fission Nightly (M6) milestone
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Depends on D62625
Assignee | ||
Comment 3•4 years ago
|
||
Depends on D72668
Updated•4 years ago
|
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/18646e7b984f Use the ResourceWatcher API to fetch Root NodeFront r=ochameau,nchevobbe https://hg.mozilla.org/integration/autoland/rev/977b0031b41c Throw when calling ResourceWatcher::watch twice for the same type r=nchevobbe,ochameau
Comment 5•4 years ago
|
||
Backed out 3 changesets (bug 1635467, bug 1625961) for Devtools failures in resources/tests/browser_resources_exceptions.js. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=301557137&repo=autoland&lineNumber=14173
Push with failure:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&revision=1fd6a3754afb1497c1169d7054f5466e38b197a4
Backout:
https://hg.mozilla.org/integration/autoland/rev/494916b74ee5b90dc116b5f84c8f9a8c34c97624
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c7757cea8327 Use the ResourceWatcher API to fetch Root NodeFront r=ochameau,nchevobbe https://hg.mozilla.org/integration/autoland/rev/cf46002eefb0 Throw when calling ResourceWatcher::watch twice for the same type r=nchevobbe,ochameau
Comment 7•4 years ago
|
||
Backed out for mochitest perma failures.
Assignee | ||
Updated•4 years ago
|
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c24dddd0d636 Use the ResourceWatcher API to fetch Root NodeFront r=ochameau,nchevobbe https://hg.mozilla.org/integration/autoland/rev/ec4126b8bd7a Throw when calling ResourceWatcher::watch twice for the same type r=nchevobbe,ochameau
Comment 9•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c24dddd0d636
https://hg.mozilla.org/mozilla-central/rev/ec4126b8bd7a
Description
•