Closed
Bug 696188
Opened 14 years ago
Closed 14 years ago
Leak nsCSSValueList with multi-transform and transition
Categories
(Core :: CSS Parsing and Computation, defect, P1)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: jruderman, Assigned: bzbarsky)
References
Details
(Keywords: memory-leak, testcase, Whiteboard: [MemShrink:P3])
Attachments
(5 files)
408 bytes,
text/html
|
Details | |
1.01 KB,
text/plain
|
Details | |
2.08 KB,
patch
|
dholbert
:
review+
christian
:
approval-mozilla-aurora-
|
Details | Diff | Splinter Review |
352 bytes,
text/html
|
Details | |
3.13 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
This testcase leaks a total of 392 bytes:
6 nsCSSValue::Array
4 nsCSSValueList
2 nsCSSValueList_heap
3 nsStringBuffer
Reporter | ||
Comment 1•14 years ago
|
||
(output from running a debug build with XPCOM_MEM_LEAK_LOG=2)
![]() |
Assignee | |
Comment 2•14 years ago
|
||
This is a bug in AddTransformLists; it doesn't advance resultTail all the way to the end of the list properly in the cases when it calls AddDifferentTransformLists. In particular, it moves resultTail to the next to last slot, not the last one.
Looks like this was introduced back in bug 531344.
Assignee: nobody → bzbarsky
Blocks: 531344
![]() |
Assignee | |
Comment 3•14 years ago
|
||
I made sure the crashtest fails without this patch and passes with this patch
Attachment #569138 -
Flags: review?(dholbert)
![]() |
Assignee | |
Comment 4•14 years ago
|
||
We should take this on branches too, I think...
Priority: -- → P1
Whiteboard: [need review]
Updated•14 years ago
|
Attachment #569138 -
Flags: review?(dholbert) → review+
Updated•14 years ago
|
OS: Mac OS X → All
Hardware: x86_64 → All
Comment 5•14 years ago
|
||
Tested this bug a little locally for rendering issues. AFAICT, whenever we hit this bug, we end up rendering as if the -moz-transform property is unset, and its computed value is also the initial value ("none").
I'll be posting two functional regression-tests for this in a bit. One is a reftest, to check the rendering visually, and the other is a mochitest, to be sure the computed style is set correctly.
Comment 6•14 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #5)
> AFAICT, whenever we
> hit this bug, we end up rendering as if the -moz-transform property is
> unset, and its computed value is also the initial value ("none").
er.. just kidding, that's expected -- because the attached testcase re-assigns the style attribute (blowing away the "-moz-transform" specification). So, I haven't run across any behavioral effects of this bug yet (but I expect to find some).
![]() |
Assignee | |
Comment 7•14 years ago
|
||
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla10
![]() |
Assignee | |
Comment 8•14 years ago
|
||
Comment on attachment 569138 [details] [diff] [review]
Fix
Requesting aurora approval. This is a simple fix to not leak memory when appending linked lists to each other...
The only risk I can see here is that our old behavior dropped part of the transform list from the transition/animation interpolated values (incorrectly!) and that it's _possible_ that some site somewhere depends on that bug.
Attachment #569138 -
Flags: approval-mozilla-aurora?
Updated•14 years ago
|
Whiteboard: [MemShrink]
![]() |
||
Updated•14 years ago
|
Whiteboard: [MemShrink] → [MemShrink:P3]
Comment 9•14 years ago
|
||
Here's a testcase that demonstrates the functionality aspect of this bug.
The part of the transform list that's dropped (per comment 8) is the translation component, so as shown here, when we transition from a matrix with a translation to "none", we get weird behavior (snapping back and forth).
Comment 10•14 years ago
|
||
Here's a followup patch, with 2 assertions about "resultTail" really being a tail, and a test for the functionality that was broken here.
Attachment #569548 -
Flags: review?(bzbarsky)
Comment 11•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
![]() |
Assignee | |
Comment 12•14 years ago
|
||
Comment on attachment 569548 [details] [diff] [review]
followup: add assertions & functional test
r=me
Attachment #569548 -
Flags: review?(bzbarsky) → review+
Comment 13•14 years ago
|
||
Landed followup: https://hg.mozilla.org/integration/mozilla-inbound/rev/6181f480fcea
Comment 14•14 years ago
|
||
Comment 15•14 years ago
|
||
Comment on attachment 569138 [details] [diff] [review]
Fix
[triage comment]
The benefit doesn't really look to be here and we think it could gain from additional bake time (for finding potentially affected sites mentioned in comment 8, etc). We'll let this one ship through the normal process.
Attachment #569138 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora-
You need to log in
before you can comment on or make changes to this bug.
Description
•