Closed
Bug 1223766
Opened 9 years ago
Closed 9 years ago
Removing an actor from an actor pool should destroy it.
Categories
(DevTools :: General, defect)
DevTools
General
Tracking
(firefox45 fixed)
RESOLVED
FIXED
Firefox 45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: ejpbruel, Assigned: ejpbruel)
References
Details
Attachments
(1 file, 1 obsolete file)
3.92 KB,
patch
|
past
:
review+
|
Details | Diff | Splinter Review |
The way we deal with actor lifetimes is currently inconsistent, in the sense that removing an actor pool will destroy all actors in that pool, but removing a single actor from the pool will not destroy it. This is somewhat unfortunate when the lifetime of a particular actor doesn't match that of any other actor: in that case, we either have to create a separate pool, containing only that single actor, or destroy the actor explicitly. Note that this does not lead to problems when moving an actor from one pool to another: adding the actor to the new pool will remove it from the old one, without destroying it.
Assignee | ||
Comment 1•9 years ago
|
||
Note that this patch causes test failures in test_promises_object_timetosettle-02.js because that test is broken. See bug 1207702 for details.
Attachment #8686000 -
Flags: review?(janx)
Assignee | ||
Comment 2•9 years ago
|
||
Try run for this patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=65d0abac7b85
Assignee | ||
Updated•9 years ago
|
Comment 4•9 years ago
|
||
Comment on attachment 8686000 [details] [diff] [review] Removing an actor from an actor pool should destroy it. Review of attachment 8686000 [details] [diff] [review]: ----------------------------------------------------------------- Thanks Eddy! From what I can tell your patch looks OK, but please eventually run it by treeherder to make sure it won't break any tests. I don't feel very comfortable reviewing this actor-lifetime change in the limited time I have, so I'll forward the rest of the review to Alex. Please direct any follow-up review requests to him as well. Also, I think you forgot a call site[0] of `ActorPool.cleanup()`. [0] https://dxr.mozilla.org/mozilla-central/source/devtools/server/actors/promises.js#229 ::: devtools/server/actors/common.js @@ +217,5 @@ > } > > ActorPool.prototype = { > /** > + * Run all actor cleanups. Nit: "Remove all remaining actors"? ::: devtools/server/main.js @@ +1386,5 @@ > let index = this._extraPools.lastIndexOf(aActorPool); > if (index > -1) { > let pool = this._extraPools.splice(index, 1); > if (!aNoCleanup) { > + pool.map(function(p) { p.destroy(); }); Nit: I find it strange to call `map()` on an array that will only ever have one element. What about `let pool = this._e.splice(index, 1)[0]` and then `pool.destroy()`?
Attachment #8686000 -
Flags: review?(poirot.alex)
Attachment #8686000 -
Flags: review?(janx)
Attachment #8686000 -
Flags: feedback+
Comment 5•9 years ago
|
||
(P.S. Nevermind my comment about try runs, I see you already sent one.)
Assignee | ||
Comment 6•9 years ago
|
||
New patch with nits by Jan addressed.
Attachment #8686000 -
Attachment is obsolete: true
Attachment #8686000 -
Flags: review?(poirot.alex)
Attachment #8686464 -
Flags: review?(poirot.alex)
Comment 7•9 years ago
|
||
Comment on attachment 8686464 [details] [diff] [review] Removing an actor from an actor pool should destroy it. Alex took the day off. Panos, could you please have a look instead? I already pre-reviewed the patch, but I'd love feedback from someone who knows actor/pool lifetimes better than me.
Attachment #8686464 -
Flags: review?(poirot.alex) → review?(past)
Comment 8•9 years ago
|
||
Comment on attachment 8686464 [details] [diff] [review] Removing an actor from an actor pool should destroy it. Review of attachment 8686464 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me, thanks!
Attachment #8686464 -
Flags: review?(past) → review+
Comment on attachment 8686464 [details] [diff] [review] Removing an actor from an actor pool should destroy it. Review of attachment 8686464 [details] [diff] [review]: ----------------------------------------------------------------- I believe you can also remove the use of `cleanup` from protocol.js: https://dxr.mozilla.org/mozilla-central/source/devtools/server/protocol.js#833
Comment 11•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3da6ad8bb8a9
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•