Ensure that console is cleared when doing a server side top level target switch
Categories
(DevTools :: Console, defect, P2)
Tracking
(Fission Milestone:M8, firefox91 fixed)
Tracking | Status | |
---|---|---|
firefox91 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
(Blocks 1 open bug)
Details
(Whiteboard: dt-fission-m3-mvp)
Attachments
(6 files, 4 obsolete files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Once bug 1694651 is landed, you can toggle devtools.target-switching.server.enabled
to true and when navigating between two distinct origins, with fission enabled, you will see that the console is no longer cleared, even if persists log is off.
It comes from this code:
https://searchfox.org/mozilla-central/source/devtools/client/webconsole/webconsole-connection-proxy.js#161-174
which only tries to clear the console when will-navigate
is fired.
Unfortunately, server side target swiching breaks will-navigate
.
We should probably follow StyleEditor example, and instead of listening to will-navigate
, we would listen to:
- onTargetAvailable:
https://searchfox.org/mozilla-central/rev/4fa18c26fa907f38d56b599571b9846af1506f3c/devtools/client/styleeditor/StyleEditorUI.jsm#1268-1272
This one will be to support server side target switching long term. Once we will fire a new target for all types of navigations. - DOCUMENT_EVENT's dom-loading:
https://searchfox.org/mozilla-central/rev/4fa18c26fa907f38d56b599571b9846af1506f3c/devtools/client/styleeditor/StyleEditorUI.jsm#1209-1223
That is still required to support same-process navigation, when server side target switching is off. This event fires for both in-process and cross-process navigations. But we also have to ignore some of these events which may come late and as for StyleEditor, ignore dom-loading based onshouldBeIgnoredAsRedundantWithTargetAvailable
attribute.
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
That's to ensure clearing the panels sooner than later.
A few tests depend on this. Without that, "navigate" event,
which isn't throttled, fires before dom-loading.
That ends up being a logic issue in the console code.
Assignee | ||
Comment 2•4 years ago
|
||
About browser_jsterm_autocomplete_getters_cache, we weren't correctly waiting
for popup to close because of the reload. Instead we probably worked around intermittents
by closing the popup explicitly before the reload.
But that creates other issue, where the reload may close the popup after we do Ctrl+Space.
Assignee | ||
Comment 3•4 years ago
|
||
Surprisingly, there is no issue with ResourceWatcher cache,
but only with the WebConsoleWrapper which gets its inner cache purged.
Assignee | ||
Comment 4•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 6•4 years ago
|
||
I'll actually fix this via bug 1706995, which is a quick workaround until we can really revisit "will-navigate" event.
And keep this bug to provide a good test for this.
Updated•4 years ago
|
Comment 7•3 years ago
|
||
Comment on attachment 9216155 [details]
Bug 1702511 - [devtools] Cover console persist feature with cross process navigation.
Revision D112231 was moved to bug 1712567. Setting attachment 9216155 [details] to obsolete.
Comment 8•3 years ago
|
||
Comment on attachment 9217365 [details]
Bug 1702511 - [devtools] Implement DOCUMENT_EVENT's will-navigate in order to replace target actor's will-navigate.
Revision D112922 was moved to bug 1712592. Setting attachment 9217365 [details] to obsolete.
Updated•3 years ago
|
Assignee | ||
Comment 9•3 years ago
|
||
Note that the timestamp being set in WebConsoleWrapper is overriding the one passed from will-navigate
and ends up being wrong and too late.
Assignee | ||
Comment 10•3 years ago
|
||
The following changeset, migrating from target's will-navigate events
to DOCUMENT_EVENT resources, triggers some action dispatch while calling
_attachTargets
. i.e. Some dispatch* methods of WebConsoleWrapper get called.
But as it wasn't initialized yet, it was throwing.
Assignee | ||
Comment 11•3 years ago
|
||
Assignee | ||
Comment 12•3 years ago
|
||
Assignee | ||
Comment 13•3 years ago
|
||
Comment 14•3 years ago
|
||
Comment on attachment 9224236 [details]
Bug 1702511 - [devtools] Use DOCUMENT_EVENT will-navigate in ResourceCommand to prune its cache.
Revision D116345 was moved to bug 1713643. Setting attachment 9224236 [details] to obsolete.
Comment 15•3 years ago
|
||
Comment on attachment 9224249 [details]
Bug 1702511 - [devtools] Tweak browser_navigateEvents.js to cover both target navigate events and DOCUMENT_EVENT resources.
Revision D116358 was moved to bug 1713670. Setting attachment 9224249 [details] to obsolete.
Comment 16•3 years ago
|
||
Comment 17•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a4562f19df54
https://hg.mozilla.org/mozilla-central/rev/8967dc205c21
https://hg.mozilla.org/mozilla-central/rev/90d2e0a0ead6
https://hg.mozilla.org/mozilla-central/rev/3e18373a945f
https://hg.mozilla.org/mozilla-central/rev/1a4738901acf
https://hg.mozilla.org/mozilla-central/rev/f7988048b5d7
Description
•