Closed Bug 1731552 Opened 3 years ago Closed 3 years ago

WindowResizeObserver leaks and holds the target actor in memory

Categories

(DevTools :: Framework, defect)

defect

Tracking

(firefox94 fixed)

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

(Whiteboard: dt-perf-stability-mvp)

Attachments

(1 file)

WindowResizeObserver is leaked because it never unregister its resize DOM listener.
We never unregister it because don't call its super class Observable::destroy from here:
https://searchfox.org/mozilla-central/rev/13378066961f195595822d4f543c8ac5b7f46490/devtools/server/actors/reflow.js#501-504
And that's Observable::destroy which will ultimately lead to call _stopListeners...

Because of this we keep the target actor in memory.

We weren't calling super class destroy method (Observable::destroy),
which is the one which will force ultimately unregistering the resize DOM listener.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ecef8435596f [devtools] Avoid leaking WindowResizeObserver by not clearing it on destroy. 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: