Open Bug 1702511 Opened 1 month ago Updated 20 days ago

Ensure that console is cleared when doing a server side top level target switch

Categories

(DevTools :: Console, defect, P2)

defect

Tracking

(Fission Milestone:M8)

ASSIGNED
Fission Milestone M8

People

(Reporter: ochameau, Assigned: ochameau)

References

(Depends on 1 open bug, Blocks 2 open bugs)

Details

(Whiteboard: dt-fission-m3-mvp)

Attachments

(5 files)

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:

Fission Milestone: --- → M8
Whiteboard: dt-fission-m3-triage → dt-fission-m3-mvp
Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Depends on: 1704805
Depends on: 1704806
Depends on: 1704811
Severity: -- → S3
Priority: -- → P2

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.

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.

Surprisingly, there is no issue with ResourceWatcher cache,
but only with the WebConsoleWrapper which gets its inner cache purged.

Attachment #9216156 - Attachment description: Bug 1702511 - Avoid removing the navigation request on navigation in console batch registry. → Bug 1702511 - [devtools] Avoid removing the navigation request on navigation in console batch registry.
Attachment #9216155 - Attachment description: Bug 1702511 - Clear console messages when doing a navigation across processes. → Bug 1702511 - [devtools] Clear console messages when doing a navigation across processes.
Attachment #9216154 - Attachment description: Bug 1702511 - Flush resources when receiving the dom-loading event. → Bug 1702511 - [devtools] Flush resources when receiving the dom-loading event.

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.

Depends on: 1706995
Attachment #9216155 - Attachment description: Bug 1702511 - [devtools] Clear console messages when doing a navigation across processes. → Bug 1702511 - [devtools] Cover console persist feature with cross process navigation.
You need to log in before you can comment on or make changes to this bug.