Closed
Bug 508919
Opened 16 years ago
Closed 16 years ago
Leak (style objects?) with display:table-cell, -moz-border-left-colors:inherit
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: jruderman, Assigned: bzbarsky)
References
Details
(Keywords: assertion, memory-leak, testcase)
Attachments
(2 files)
|
186 bytes,
text/html
|
Details | |
|
38.22 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
Reloading triggers:
###!!! ASSERTION: Some objects allocated with AllocateFrame were not freed: 'mFrameCount == 0', file /Users/jruderman/central/layout/base/nsPresShell.cpp, line 683
| Assignee | ||
Comment 1•16 years ago
|
||
This is definitely leaking an nsStyleBorder (verified by adding ctor/dtor logging to all the style structs). We're landing in nsRuleNode::ComputeBorderData with:
(gdb) p aCanStoreInRuleTree
$9 = 1
(gdb) p aRuleDetail
$10 = nsRuleNode::eRulePartialInherited
and at the end of the function we have:
(gdb) p canStoreInRuleTree
$11 = 1
Which is, of course, broken.
| Assignee | ||
Comment 2•16 years ago
|
||
Comment on attachment 393131 [details] [diff] [review]
Fix (plus logging and asserts to make this easier to debug in the future)
r=dbaron
Can we add assertions in COMPUTE_END_* that if the rule detail is *Inherit* or *Mixed* (or also, for inherited structs *Partial* or *None*) that canStoreInRuleTree is false? Or are the rule details not that accurate? I suspect they might not be...
Also, did you check that your new assertions aren't firing during layout/style mochitests? It's probably worth doing.
Attachment #393131 -
Flags: review?(dbaron) → review+
| Assignee | ||
Comment 4•16 years ago
|
||
> Or are the rule details not that accurate?
Hmm. I think they should be for the most part, except:
1) border-color: inherit on the root does not set canStoreInRuleTree to false.
Maybe it should?
2) If we have a property that is in CSS_PROP_something but not actually
computed, it could affect the detail but not canStoreInRuleTree. That would
be a bug, though, so I'm temped to say we should not take it into account.
I'm going to try fixing item 1 above, adding those asserts and running the mochitests; see what happens.
| Assignee | ||
Comment 5•16 years ago
|
||
Added the asserts per comment 4. They don't fire during tests; pushed http://hg.mozilla.org/mozilla-central/rev/45cee94d82f3
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•16 years ago
|
Target Milestone: --- → mozilla1.9.2a1
You need to log in
before you can comment on or make changes to this bug.
Description
•