Created attachment 731205 [details]
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:20.0) Gecko/20100101 Firefox/20.0
Build ID: 20130320062118
Steps to reproduce:
usign CSS opacity transition with OMTC
Memroy leak (finding with trace-malloc)
nsTArray does not own it manages pointers and there are not released in its destructor
Hi Christophe, thanks for your patch, can you please format it with the "unified" format, as shown here https://developer.mozilla.org/en-US/docs/Creating_a_patch
and submit it again?
Please add me as reviewer when you do, patches without review request tend to not get much attention.
Created attachment 734745 [details] [diff] [review]
Fixes ComputedTimingFunction leak (reformated patch)
This fix shouldn't wait longer so I reformated the patch (Christophe, I made sure to put your name and not mine in the patch's header, I don't mean to steal your work).
It's probably worth uplifting asap, I wonder if this could be the cause of the b2g camera app leak.
pushed to try severs https://tbpl.mozilla.org/?tree=Try&rev=52f7e9568509
> + InfallibleTArray<nsAutoPtr<css::ComputedTimingFunction>>& functions = data->mFunctions;
Shouldn't this be "> >"? I'd be surprised if all the compilers we support work with ">>" closing the nested template.
How do you think this might cause leaks of the objects identified in bug 846903 comment 64? I don't see the ComputedTimingFunction class holding on to OGL objects (or any objects at all, actually).
(In reply to Justin Lebar [:jlebar] from comment #5)
> > + InfallibleTArray<nsAutoPtr<css::ComputedTimingFunction>>& functions = data->mFunctions;
> Shouldn't this be "> >"? I'd be surprised if all the compilers we support
> work with ">>" closing the nested template.
Oh, right. here is a fix
> How do you think this might cause leaks of the objects identified in bug
> 846903 comment 64? I don't see the ComputedTimingFunction class holding on
> to OGL objects (or any objects at all, actually).
This leak happens in SetAnimation which you mentioned in Comment 47 of the b2g bug:
> from mozilla::layers::Layer::SetAnimations(), which may or may not be related.
I suppose this won't fix the leak in the camera entirely though.
Created attachment 734772 [details] [diff] [review]
Fixes ComputedTimingFunction leak (reformated patch) with >> template syntax fix. Carries jmuizelaar: review+
*** Bug 861492 has been marked as a duplicate of this bug. ***
tef? because of bug 861492. Let's land this, please.