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)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: jruderman, Assigned: bzbarsky)

References

Details

(Keywords: assertion, memory-leak, testcase)

Attachments

(2 files)

Attached file testcase
Reloading triggers: ###!!! ASSERTION: Some objects allocated with AllocateFrame were not freed: 'mFrameCount == 0', file /Users/jruderman/central/layout/base/nsPresShell.cpp, line 683
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: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #393131 - Flags: review?(dbaron)
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+
> 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.
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
Depends on: 509155
Depends on: 509156
Depends on: 509569
Target Milestone: --- → mozilla1.9.2a1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: