Closed Bug 831791 Opened 9 years ago Closed 9 years ago
possible memory leak in Compositor
Parent in Sample Value
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20130115 Firefox/20.0 Build ID: 20130115042018 Steps to reproduce: Using css transform (translateX) of a <p> element (scrolling text) Actual results: In method SampleValue in CompositorParent.cpp (gfx/layers/ipc/), a InfallibleTArray<TransformFunction> object is constructed, and copied in a Animatable. The object seem never been destructed. The code is like: InfallibleTArray<TransformFunction>* functions = new InfallibleTArray<TransformFunction>(); functions->AppendElement(TransformMatrix(transform)); *aValue = *functions; Perhaps it should be : InfallibleTArray<TransformFunction> functions; functions.AppendElement(TransformMatrix(transform)); *aValue = functions;
Not sure what this code is supposed to be doing but it does look like there's a memory leak. CC'ing :dzbarksy who added it and :roc who r+'d it.
Component: General → Graphics
OS: Windows 7 → Android
Product: Firefox for Android → Core
Hardware: x86_64 → All
Version: Firefox 18 → Trunk
9 years ago
Yep, your suggestion seems correct.
Samuel, would you be willing to create a patch for review with your suggested change? There are instructions at https://developer.mozilla.org/en-US/docs/Developer_Guide/How_to_Submit_a_Patch (and specifically https://developer.mozilla.org/en-US/docs/Creating_a_patch_that_can_be_checked_in). If not let me know and I can do it.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 704493 [details] [diff] [review] Correction proposal patch Samuel, the patch should really include a commit message and your author info (name + email) as well.
Comment on attachment 704556 [details] [diff] [review] Correction proposal patch Thanks! :)
Attachment #704556 - Flags: review?(dzbarsky)
Comment on attachment 704556 [details] [diff] [review] Correction proposal patch Looks good to me. Make sure you put "r=dzbarsky" in your commit message.
Attachment #704556 - Flags: review?(dzbarsky) → review+
The person landing it can do that. Inbound is closed currently so marking as checkin-needed.
Landed on inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/f92a3d2c1e5b
Assignee: nobody → samuel.gallacier
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Should we consider uplift this to b2g18? Leaking a object for each animation composition seems pretty bad.
Sounds like a good idea to me. It's a simple enough patch.
I spoke about this with kats via IRC and he re-iterated his thinking that this was low risk and worth the reward.
blocking-b2g: tef? → tef+
Landed on mozilla-b2g18/gaia master prior to the 1/25 branching to mozilla-b2g18_v1_0_0/v1.0.0, updating status-b2g-v1.0.0 to fixed.
scratch the previous comment - it got uplifted yesterday to the right branches - still fixed.
You need to log in before you can comment on or make changes to this bug.