Messages and errors from previous window globals may be notified twice
Categories
(DevTools :: Console, defect)
Tracking
(Fission Milestone:M8, firefox91 fixed)
Tracking | Status | |
---|---|---|
firefox91 | --- | fixed |
People
(Reporter: ochameau, Assigned: nchevobbe)
References
Details
(Whiteboard: dt-fission-m3-mvp)
Attachments
(1 file, 1 obsolete file)
When enabling server side target switching (devtools.target-switching.server.enabled = true), we do create one target actor per WindowGlobal.
By doing so, we end up creating resource watchers for each WindowGlobal.
These console watchers will fetch errors and messages from platform cache:
https://searchfox.org/mozilla-central/source/devtools/server/actors/resources/utils/nsi-console-listener-watcher.js#55,62
This cache contains all errors and messages coming from any document running in the current process. So that it will typically contain messages from the previous WindowGlobal...
And as the code filtering out the messages currently filter out by browserId
:
https://searchfox.org/mozilla-central/source/devtools/server/actors/resources/error-messages.js#84
We end up notifying about the previous WindowGlobal messages twice.
If persist is ON we will notify about all previous document messages twice,
if persist if OFF, we will see previous document messages in addition to the new document ones.
devtools/client/framework/test/browser_toolbox_error_count_reset_on_navigation.js is failing with devtools.target-switching.server.enabled = true because of that.
Reporter | ||
Comment 1•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Updated•4 years ago
|
Comment 4•4 years ago
|
||
bugherder |
Description
•