Stop using "will-navigate" in the debugger
Categories
(DevTools :: Debugger, task, P3)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned)
References
(Blocks 1 open bug)
Details
We should stop using navigate/will-navigate and instead use target-available/destroyed callbacks, or document-events. See meta bug 1632141.
The debugger is using will-navigate at https://searchfox.org/mozilla-central/rev/8cb90829ccf18f95cd75d8419c84729c754a8e83/devtools/client/debugger/src/actions/navigation.js#26
It triggers the following cleanup:
sourceQueue.clear();
sourceMaps.clearSourceMaps();
clearWasmStates();
clearDocuments();
parser.clear();
And emits a NAVIGATE action, which is used to reset the state in many reducers:
https://searchfox.org/mozilla-central/search?q=case+%22NAVIGATE%22&path=&case=true®exp=false.
(note: the debugger also uses the target's "navigate" event but this is not related to the NAVIGATE action).
We should try to use onTargetAvailable instead.
Suggested complexity: intermediate
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
Just remembered that we can't fully do any of that until all our frame targets are bound to the lifecycle of the window global.
In the meantime we still need to support old targets which persist after navigation reload.
Closing for now, I think the only actionable thing we could do for now is making sure we have tests covering the will-navigate codepath.
Updated•4 years ago
|
Description
•