Unify the various clean/destroy/disconnect methods
Categories
(Remote Protocol :: Agent, enhancement)
Tracking
(Not tracked)
People
(Reporter: ochameau, Assigned: ochameau)
References
Details
Attachments
(2 files)
One convention stands out of the current code: most of the cleanup/destruction code operates from a method called destructor
, which cleanly matches constructor
method used by ES6 classes.
At least one component, ContentProcessSession names it destroy
. We should rename it.
Then, we use the word disconnect
for something that looks more like a destruction than a disconnection. In the case of Targets, the usage of connect and disconnect is misleading as when these methods are called (connect/disconnect), there is no connection being made. Instead it is about a target being just created and to be registered, and a target being destroyed and to be unregistered and forget about. That looks more like a contructor/destructor pattern.
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
Connect and disconnect in misleading here as a target aren't connected/disconnected,
but instead, being unregistered and destroyed. The fact that they are "disconnected"
is a side effect of this destruction. Also note that a Target is never "connected",
it is only a Connection and its related sessions which really are connected to a remote client.
Assignee | ||
Updated•5 years ago
|
Comment 4•5 years ago
|
||
bugherder |
Comment 6•5 years ago
|
||
bugherder |
Comment 7•5 years ago
|
||
Alexandre, is something left here for landing or can the bug been closed now?
Assignee | ||
Comment 8•5 years ago
|
||
It can be closed, I forgot to remove the leave-open when landing the second last part.
Assignee | ||
Updated•5 years ago
|
Description
•