Not an expert in leak-hunting, but generally this happens every time you leave something like an observer or such registered and you don't de-register it where the page goes away. It'd keep all the window alive. Probably can also happen with some native event listeners or what not...

A recent example if it may help: This patch got backed out due to leaking the layout debugger window:

This is the fixed version:

And this the interdiff:

That one was pretty obvious to fix, but yeah, tracking pre-existing ones is tricky... I think the best way to do that is using:

On the logs generated using:

(There are docs there about how to generate those from automation)

This is useful to find leaks of individual objects too, where you may want to find where the object is allocated rather than what keeps it alive:

But I guess that's not all that useful for chasing window leaks.

I'm not an expert on these tools myself, hopefully Andrew or one of the people with more experience with them can help more...

Hope it helps,

 -- Emilio

On 10/2/19 11:29 PM, Geoff Lankow wrote:
Hi all, I need some advice.

I'm trying to enable Mochitest on debug builds of Thunderbird. It works fine, except for the leak check, which finds a number of leaked windows and docshells. Obviously we don't want to leak these things, but I can't find what's holding onto them.

I've ruled out a number of likely candidates and I'm quickly running out of ideas. Can you offer any tips or tricks that might help?

Here's an example log:

dev-platform mailing list
dev-platform mailing list

Reply via email to