ThreadFront and WebConsoleFront are the only two one left having a special codepath in TargetMixin.
These two are special as there is synchronous attributes on the
threadFront, in order to get a reference to them.
Their instantiation is also special as you have to call
target.attachConsole as well as
target.attachThread in order to create these attributes.
There is some discrepancies between these two and all the other one which are created on-demand on the first call to
In any case, we should distinguish the two following operation:
- retrieving the front:
- "attaching it":
A first iteration would be to do this split and use target.getFront everywhere.
Then, we could possibly iterate in order to cleanup the various way we are "attaching" these actors.
Why is this important to switch to
target.onFront to work with these two fronts. Fission is going to force us to support more than one front instance. In a near future, we are going to replace a few calls to
getFront into calls to
onFront. This step will be easier if we are already using
- having a unified codebase. There is no reason but historical ones to have specifics around these two fronts.