Closed Bug 1727839 Opened 3 years ago Closed 3 years ago

ResourceCommand should clear its this._offTargetFrontListeners array on target destroy

Categories

(DevTools :: Framework, defect)

defect

Tracking

(firefox94 fixed)

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

(Whiteboard: dt-perf-stability-triage)

Attachments

(1 file)

Otherwise we end up leaking all target fronts.

We do add an item in this array over here:
https://searchfox.org/mozilla-central/rev/be9c0ff754a04b32226b68aa014a8137ac29bd53/devtools/shared/commands/resource/resource-command.js#460-464

    this._offTargetFrontListeners.push(
      offResourceAvailable,
      offResourceUpdated,
      offResourceDestroyed
    );

which holds the target alive.
We only clear this array on toolbox close, whereas we should clean it up on each target destruction.

Assignee: nobody → poirot.alex
Attachment #9238459 - Attachment description: Bug 1727839 - [devtools] Avoid leaking targets from the ResourceCommand → Bug 1727839 - [devtools] Avoid leaking targets from the ResourceCommand.
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/427294926a9e
[devtools] Avoid leaking targets from the ResourceCommand. r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: