ThreadActor is not destroyed when content process target is destroyed
Categories
(DevTools :: Debugger, defect)
Tracking
(firefox84 fixed)
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
Details
Attachments
(2 files)
ContentProcessTargetActor isn't calling ThreadActor.exit, whereas this is the only way to fully destroy this special actor. That's because ThreadActor.destroy isn't calling Actor.destroy. Instead ThreadActor.exit does it.
So that destroying the target actor, which manages the thread actor, will call all its children actor's destroy method. But we expect to call exit.
BrowsingContext target actor has a special code to do that right:
https://searchfox.org/mozilla-central/source/devtools/server/actors/targets/browsing-context.js#1011
https://searchfox.org/mozilla-central/source/devtools/server/actors/targets/browsing-context.js#1046
https://searchfox.org/mozilla-central/source/devtools/server/actors/targets/browsing-context.js#641
https://searchfox.org/mozilla-central/source/devtools/server/actors/targets/browsing-context.js#620
We could probably benefit from cleaning up/removing this "exit" logic in favor of a unique destroy codepath.
Assignee | ||
Comment 1•4 years ago
|
||
We have to manually call exit
as calling destroy
won't completely destroy it.
ThreadActor.destroy do not call protocoljs.Actor.destroy, ThreadActor.exit does it.
Assignee | ||
Comment 2•4 years ago
|
||
This may prevent logging a few exception or error messages.
But thanks to the other patch of this bug, we should try to stop listening
for sources as soon as the thread actor is destroyed.
Assignee | ||
Comment 3•4 years ago
|
||
Assignee | ||
Comment 4•4 years ago
|
||
Comment 6•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9620179e672b
https://hg.mozilla.org/mozilla-central/rev/43b98bc28bdc
Description
•