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)
- conn.addActorPool calls were removed as it's already done in the Pool _poolMap getter
- conn.removeActorPool(x) calls were turned into x.destroy , as the former is called
from Pool#destroy.
Also, some actors were overriding Actor#initialize without calling
Actor.prototype.initialize.call, which mean they didn't have a `conn`
property.
Differential Revision: https://phabricator.services.mozilla.com/D66780
--HG--
extra : moz-landing-system : lando
This has some fun wins
- colored prompt
- multiline textarea
- default value for log points
Differential Revision: https://phabricator.services.mozilla.com/D26585
--HG--
extra : moz-landing-system : lando
We create one file per actor, and move the ones that are only used by the ObjectActor
into an object folder.
We also take this as an opportunity to extract utils function used in at least 2
different files into an object/utils.js file.
Furthermore, we extract stringifiers and previewers in their own files for readibility
sake, and rename DebuggerServer.ObjectActorPreviewers to previewers only, as
we don't make any use of putting those into DebuggerServer.
MozReview-Commit-ID: L9ajKrzkC4k
--HG--
rename : devtools/server/actors/object.js => devtools/server/actors/array-buffer.js
rename : devtools/server/actors/object.js => devtools/server/actors/object/long-string.js
rename : devtools/server/actors/object.js => devtools/server/actors/object/previewers.js
rename : devtools/server/actors/object.js => devtools/server/actors/object/property-iterator.js
rename : devtools/server/actors/object.js => devtools/server/actors/object/stringifiers.js
rename : devtools/server/actors/object.js => devtools/server/actors/object/symbol-iterator.js
rename : devtools/server/actors/object.js => devtools/server/actors/object/symbol.js
rename : devtools/server/actors/object.js => devtools/server/actors/object/utils.js
extra : rebase_source : ae332d0a85d9d8bcc306d399fffbd0ec643db49c
Ever since protocol.js was added as a way to create DevTools actors, we've had
lots of confusion about the correct way to implement actor destruction. If your
actor's _parent_ was the legacy kind, you had to use `disconnect`. If it was
protocol.js, you had to use `destroy`.
There is no reason for this madness, which makes reasoning about destruction
quite hard. Here we rename `disconnect` to `destroy` so there is only one name
for every destruction path.
MozReview-Commit-ID: C1Yw9NfUUR2
--HG--
extra : rebase_source : 4d018622b7547d404510e0b563c6324c0127aafc
For simple rules like function spacing, we can auto-fix these across the code
base so they are followed in a consistent way.
To generate this patch, I ran:
./mach eslint devtools --no-ignore --fix
After this, I reverted any changes to third party files that we really do want
to ignore.
MozReview-Commit-ID: 6Q8BApkAW20