Open
Bug 1621894
Opened 5 years ago
Updated 2 years ago
investigate RootActor#removeActorByName
Categories
(DevTools :: Framework, task, P3)
DevTools
Framework
Tracking
(Not tracked)
ASSIGNED
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
Details
In this function (devtools/server/actors/root.js#734-740 ), we iterate over this._tabDescriptorActorPool
children, and call their removeActorByName
.
The issue is that removeActorByName
is a BrowsingContextTargetActor
, and the children in _tabDescriptorActorPool
should be TabDescriptors
(devtools/server/actors/descriptors/tab.js#39) which don't have such method.
So if this is called, this is probably throwing.
Updated•5 years ago
|
Priority: -- → P3
Assignee | ||
Comment 1•5 years ago
•
|
||
So, this function is called from
removeTargetScopedActor
(devtools/server/actors/utils/actor-registry.js#342-347)- which is called from
unregisterModule
(devtools/server/actors/utils/actor-registry.js#96-113) - which only seems to be called by
destroy
(devtools/server/actors/utils/actor-registry.js#422-430 ) - which is called from
DevToolsServer#destroy
(devtools/server/devtools-server.js#148-164), where we close the connections - and when a connections closes, it calls
DevToolsServer._connectionClosed
([https://searchfox.org/mozilla-central/rev/f36cb2af46edd2659f446b7acdb2154e230ee445/devtools/server/devtools-server-connection.js#482]) - in which we remove the connection from the set of DevToolsServer connections (devtools/server/devtools-server.js#473)
- which means, the connections set is now empty, and since it's what we pass to the actor registery (devtools/server/devtools-server.js#129 ) we won't have anything to loop over
for (const connID of Object.getOwnPropertyNames(this._connections)) { // this._connections is an empty object here
so what's inside the loop isn't called, and we don't see the underlying issue (calling a method that does not exist on tab descriptors)
it also appears to be called from
unregisterActor
(devtools/server/actors/utils/actor-registry-utils.js#75-94)- which is called by
ActorActor#unregister
(devtools/server/actors/actor-registry.js#29-31 )
but I'm not sure if/how this is used from the client, I need to investigate a bit more
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•