NETWORK_EVENT resources are always flagged with the top level target front/innerWindowId
Categories
(DevTools :: Netmonitor, defect)
Tracking
(firefox97 fixed)
| Tracking | Status | |
|---|---|---|
| firefox97 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
Details
Attachments
(1 file)
All NETWORK_EVENT resources for iframe requests are flagged with the wrong innerWindowId because of the following typo:
https://searchfox.org/mozilla-central/rev/e74a8e2d1dedebfe47a6afb009ddabdeea12694b/devtools/server/actors/network-monitor/utils/network-utils.js#110
return channel.loadInfo.innerWindowId;
Because nsILoadInfo exposes the id with this wording:
https://searchfox.org/mozilla-central/source/netwerk/base/nsILoadInfo.idl#759
[infallible] readonly attribute unsigned long long innerWindowID;
Because of that the targetFront attribute of each iframe's NETWORK_EVENT was always the top level target front.
I'm not sure it translate into any user visible bug, but we weren't clearing requests of iframe when the iframe is removed:
https://searchfox.org/mozilla-central/rev/e74a8e2d1dedebfe47a6afb009ddabdeea12694b/devtools/server/actors/resources/network-events.js#177
if (child.innerWindowId == innerWindowId) {
So fixing this we will start destroying the NetworkEventActor when iframes are removed, this can translate into blank sidebars in netmonitor when persist is OFF.
We may tune the NetworkEventActor cleanup code if we consider that's wrong.
| Assignee | ||
Comment 1•4 years ago
|
||
This also fixes the targetFront attribute for NETWORK_EVENT resources of iframes.
Comment 3•3 years ago
|
||
| bugherder | ||
Description
•