Rename Pool#actor method
Categories
(DevTools :: Framework, task, P3)
Tracking
(firefox80 fixed)
Tracking | Status | |
---|---|---|
firefox80 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
Details
Attachments
(1 file)
I always have a hard time figuring out that actor
is actually a method, as its name doesn't indicate.
We could rename it to make it more obvious what it does, especially when called from a class that extend Pool (i.e. Front and Actor)
getActor
getActorFromID
getActorInPool
getActorInPoolFromID
- something better?
Comment 1•4 years ago
|
||
Yes please! getActorFromID
or getActorByID
sound good to me.
Assignee | ||
Comment 2•4 years ago
|
||
what about getChildByID
? this method can retrieve Fronts or Actors, so child
might be more self-explanatory?
Assignee | ||
Comment 3•4 years ago
|
||
We should also remove Pool#get and switch callsite to the renamed method.
Assignee | ||
Comment 4•4 years ago
|
||
this work is revealing a couple of bugs, one of them around the EnvironmentFront (Bug 1649710), and the other one in the AccessibilityPanel/reps (need to be investigated)
Assignee | ||
Comment 5•4 years ago
|
||
We take this opportunity to remove Pool.get as well,
which was doing exactly the same thing as Pool.actor
This highlighted a couple issues in Reps:
- LongString were relying on the isGrip function, which was only checking that
the actor property was truthy. So it was matching LongStringFront which had
the actor method. This is modified by using the isLongString helper instead. - The Object rep was building all the reps for the object properties, even in
TINY mode, where the result was only used to check the length. In the Accessibility
panel, it can happen that an plain object containing front properties is passed
to Rep. It was fine before because this was short-circuited by the Accessor rep
which was only checking the truthiness of aget
property. Withget
being
removed, the default Rep was used, which is Object, and we were hitting a
recursion loop, as some of the properties of fronts are cycle references.
There should be a fix in the Accessibility panel to not pass fronts, but we
also "fix" it from here by simply not building sub-properties for the object
when we're in TINY mode.
Updated•4 years ago
|
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/76b698ec608a Rename Pool#actor into getActorByID. r=jdescottes.
Comment 7•4 years ago
|
||
bugherder |
Description
•