Closed Bug 1621712 Opened 6 years ago Closed 6 years ago

Convert ActorPool to protocol.js Pool in devtools/server/actors/

Categories

(DevTools :: Framework, task, P3)

task

Tracking

(firefox76 fixed)

RESOLVED FIXED
Firefox 76
Tracking Status
firefox76 --- fixed

People

(Reporter: jdescottes, Assigned: nchevobbe)

References

Details

Attachments

(1 external file)

ActorPool is a legacy class that should be replaced by protocol.js Pool.

https://searchfox.org/mozilla-central/rev/2fd8ffcf087bc59a8e5c962965bbb7bf230bcd28/devtools/server/actors/webconsole.js#187

Both classes have similar behavior, the cleanup should be mostly about renaming.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

All the actors using ActorPool now use Pool instead.
A few changes were needed since the API are a bit different:

  • addActor(x) was changed to manage(x)
  • removeActor(x) was changed to x.destroy() (which removes x from the Pool)
  • x.registeredPool was changed into x.parent() (registeredPool was the Pool x was in)

Also, some actors were overriding Actor#initialize without calling
Actor.prototype.initialize.call, which mean they didn't have a conn
property.

Summary: Convert ActorPool to protocol.js Pool in devtools/server/actors/webconsole.js → Convert ActorPool to protocol.js Pool in devtools/server/actors/
Pushed by dvarga@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/a77729e93cb0 Switch ActorPool usage to Pools in devtools/server/actors. r=jdescottes.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 76
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: