Closed Bug 1673550 Opened 4 years ago Closed 4 years ago

ThreadActor is not destroyed when worker target is destroyed

Categories

(DevTools :: Debugger, defect)

defect

Tracking

(firefox84 fixed)

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: ochameau, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

This is the same bug as bug 1672778, but for worker targets.

WorkerTargetActor 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. (bug 1673328)

We have to manually call ThreadActor#exit as calling destroy won't completely
destroy it, since it does not call Actor#destroy, whereas ThreadActor#exit does.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/79261eb92374 [devtools] Destroy the thread actor when the worker target actor is destroyed. r=ochameau.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: