dFPI's state partitioning console logs are not shown when fission is enabled
Categories
(Core :: Privacy: Anti-Tracking, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr91 | --- | unaffected |
firefox98 | --- | wontfix |
firefox99 | --- | wontfix |
firefox100 | --- | wontfix |
firefox101 | --- | fixed |
People
(Reporter: emz, Assigned: timhuang)
References
(Regression)
Details
(Keywords: regression)
Attachments
(3 files)
When fission is enabled we don't show the dFPI state partitioning console logs. Setting fission.autostart
to false
fixes the issue.
STR:
- Go to https://senglehardt.com/test/dfpi/simple.html
- Open the devtools and switch to the "Console" tab
Expected behavior:
Warnings are logged for partitioned cookies / storage:
"Partitioned cookie or storage access was provided to “<URL>” because it is loaded in the third-party context and dynamic state partitioning is enabled."
Actual behavior:
No state partitioning warnings shown.
Tested on:
Firefox 98.0.1 (64-bit), Ubuntu 21.10
Mozregression result:
6:29.23 INFO: Last good revision: 383986e2f5cb835a55c47bbd6e15d81035ca0784
6:29.23 INFO: First bad revision: d6e8528f0a936df88369c71f4e390e31a4d621a1
6:29.23 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=383986e2f5cb835a55c47bbd6e15d81035ca0784&tochange=d6e8528f0a936df88369c71f4e390e31a4d621a1
Points to Bug 1732358 which enabled Fission by default.
Assignee | ||
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Currently, we cannot send console message to a window that is not in the
same content process. The message will lose if the windowID is for a
window in another content process.
The patch implements that the message will be sent to the parent process
in order to dispatch to the correct content process if the windowID
targets a window in another content process.
Assignee | ||
Comment 2•3 years ago
|
||
Depends on D141095
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 3•3 years ago
|
||
You might have missed bug 1535451 comment 30.
DevTools spawn one ErrorMessageWatcher
[1] per WindowGlobal, that in the whole Tree of BrowsingContexts of the currently debugged tab.
This ErrorMessageWatcher
will fetch cached messages via Services.console.getMessageArray()
[2], and receive live messages via Services.console.registerListener
[3]. Again, once per WindowGlobal. And it will filter out per WindowGlobal.
So, if these error messages were fired with the right window global ID, they would be correctly handled by DevTools.
The issue is that's the ErrorMessageWatcher for the iframe WindowGlobal that receives the error message.
But it will only proceed the messages with the iframe WindowGlobal ID [4].
const ids = targetActor.windows.map(window =>
WebConsoleUtils.getInnerWindowId(window)
);
return ids.includes(message.innerWindowID);
targetActor.windows
, nowadays will be typicaly made of a single element array, which is the iframe window object.
And instead, the message is flagged with the top level WindowGlobal ID and ignored.
[1] https://searchfox.org/mozilla-central/rev/26a1b0fce12e6dd495a954c542bb1e7bd6e0d548/devtools/server/actors/resources/error-messages.js#35
[2] https://searchfox.org/mozilla-central/rev/26a1b0fce12e6dd495a954c542bb1e7bd6e0d548/devtools/server/actors/resources/utils/nsi-console-listener-watcher.js#48
[3] https://searchfox.org/mozilla-central/rev/26a1b0fce12e6dd495a954c542bb1e7bd6e0d548/devtools/server/actors/resources/utils/nsi-console-listener-watcher.js#49
[4] https://searchfox.org/mozilla-central/rev/26a1b0fce12e6dd495a954c542bb1e7bd6e0d548/devtools/server/actors/resources/error-messages.js#82-85
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
Depends on D142692
Comment 6•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6c9886ec0b0f
https://hg.mozilla.org/mozilla-central/rev/824b989fb729
https://hg.mozilla.org/mozilla-central/rev/29bd999e4c62
Updated•3 years ago
|
Description
•