Investigate possible breakage because of erroneous usage of DevToolsFrameChild _getTargetActorForWatcherActorID/_findTargetActor
Categories
(DevTools :: Framework, task)
Tracking
(Not tracked)
People
(Reporter: nchevobbe, Unassigned)
References
Details
(Whiteboard: dt-fission-future)
We are using the _getTargetActorForWatcherActorID
[1] (renamed to _findTargetActor
in Bug 1724909) function of DevToolsFrameChild
in a few places (e.g. _(add|remove)WatcherDataEntry
, …) to retrieve a single target matching a given (browserId, watcherActorId) pair.
The issue is that we can have multiple targets for a given (browserId, watcherActorId), as highlighted by the TargetActorRegistry
code ([2]).
This is the case for example if you have a document (e.g. on example.com
) having multiple iframes sharing the same origin (e.g. mozilla.org
).
In such case, we would communicate only with the first target we get and potentially miss some data from the other targets.
We should investigate this code, check cases where it fails, and fix it properly.
[1] https://searchfox.org/mozilla-central/rev/36904ac58d2528fc59f640db57cc9429103368d3/devtools/server/connectors/js-window-actor/DevToolsFrameChild.jsm#506
[2] https://searchfox.org/mozilla-central/rev/36904ac58d2528fc59f640db57cc9429103368d3/devtools/server/actors/targets/target-actor-registry.jsm#36,45-47,60
Description
•