Open Bug 1446181 Opened 2 years ago Updated 8 months ago

Investigate whether or not APZ subprotocols are being leaked

Categories

(Core :: Panning and Zooming, enhancement, P3)

enhancement

Tracking

()

REOPENED

People

(Reporter: kats, Assigned: kats)

References

(Depends on 1 open bug)

Details

(Keywords: perf, Whiteboard: [gfx-noted])

Attachments

(1 file)

According to https://developer.mozilla.org/en-US/docs/Mozilla/IPDL/Best_Practices, all subprotocols should have Send__delete__() called on them to delete them. However I don't think we're doing this for our APZ protocols such as PAPZCTreeManager and PAPZ. So in theory we might be leaking stuff. We should investigate and make sure we're cleaning up properly.
Priority: -- → P3
Whiteboard: [gfx-noted]
I added a printf to the APZCTreeManagerParent constructor and destructor, and it looks like we create an APZCTreeManagerParent for each tab, as expected, and they only get destroyed when the *process* they're attached to terminates. So if you happen to close the last tab in a process a bunch of them get freed. If you run with dom.ipc.processCount=1 then none of them get freed until shutdown. So yeah, this seems like a leak we should fix. I haven't checked PAPZ yet.
Comment on attachment 8990778 [details]
Bug 1446181 - Send __delete__ messages when destroying APZCTreeManagerChild instances.

https://reviewboard.mozilla.org/r/255830/#review262626
Attachment #8990778 - Flags: review?(rhunt) → review+
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5b8041f7f604
Send __delete__ messages when destroying APZCTreeManagerChild instances. r=rhunt
https://hg.mozilla.org/mozilla-central/rev/5b8041f7f604
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Depends on: 1475039
I'm going to back this out until I have time to fully investigate the crashes this introduced (bug 1475039). I took a quick look but I didn't see anything obvious, so this will take some debugging. In the meantime, transient leaks are better than crashes.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Backout by kgupta@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fe0653a84312
Back out cset 5b8041f7f604 for introducing a low-volume crash. r=me
Target Milestone: mozilla63 → ---
You need to log in before you can comment on or make changes to this bug.