Update Server methods to use Pool.actor rather than Pool.get
Categories
(DevTools :: General, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: yulia, Unassigned)
References
(Blocks 1 open bug)
Details
Comment 1•5 years ago
|
||
The pool class implements two methods which are equivalents: actor()
and get()
:
https://searchfox.org/mozilla-central/source/devtools/shared/protocol/Pool.js#99-114
https://searchfox.org/mozilla-central/source/devtools/shared/protocol/lazy-pool.js#27-43
protocol.js and newest code use actor()
, whereas old legacy code uses get()
.
We should identify all the usages of get()
in order to call actor()
instead.
There is at very least all of these cases:
https://searchfox.org/mozilla-central/search?q=pool.get(&case=false®exp=false&path=devtools%2F
But there might be lots of hidden usages, which won't only be on the actor side as Pool class is being inherited by Front and Actor classes:
https://searchfox.org/mozilla-central/search?q=%5C.get%5C(.*id%5C)&case=false®exp=true&path=devtools%2F
By scanning quickly this list, I found:
https://searchfox.org/mozilla-central/source/devtools/client/accessibility/provider.js#34
https://searchfox.org/mozilla-central/source/devtools/client/inspector/grids/grid-inspector.js#211 (may be?)
https://searchfox.org/mozilla-central/source/devtools/server/actors/thread.js#1486
https://searchfox.org/mozilla-central/source/devtools/server/actors/thread.js#1747
https://searchfox.org/mozilla-central/source/devtools/server/actors/webconsole.js#617
https://searchfox.org/mozilla-central/source/devtools/server/main.js#1200
https://searchfox.org/mozilla-central/source/devtools/shared/client/debugger-client.js#928
https://searchfox.org/mozilla-central/source/devtools/shared/fronts/inspector.js#106
https://searchfox.org/mozilla-central/source/devtools/shared/fronts/inspector.js#292
The goal here is to find all usages of get
function on anything that is Pool
, Actor
or Front
.
Reporter | ||
Updated•4 years ago
|
Updated•2 years ago
|
Description
•