Closed Bug 910 Opened 26 years ago Closed 26 years ago

Leaking Bullet Frame

Categories

(Core :: Layout, defect, P2)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: troy, Assigned: buster)

Details

Under certain circumstances the nsBlockFrame code is leaking the bullet frame which means that the list item content object (and all its child content objects are leaking). I looked the bullet frame is handled differently if it's an outside bullet vs. an inside bullet so I'm leaving it to since you know best. Here's some simple HTML that demonstrates the problem: <html> <body> <ol> <li>List item #1</li> </ol> </body> </html> Here's some output from your nifty XP-COM ref count tracking additions: 0[d526a0]: AddRef: dc0c20: 0=>1 [nsHTMLLIElement::QueryInterface NS_NewHTMLLIElement NS_CreateHTMLElement SinkContext::OpenContainer SinkContext::OpenContainer HTMLContentSink::OpenContainer CNavDT 0[d526a0]: AddRef: dc0c2c: 1=>2 [nsGenericHTMLContainerElement::AppendChildTo nsHTMLOListElement::AppendChildTo SinkContext::CloseContainer HTMLContentSink::CloseContainer CNavDTD::CloseContainer C 0[d526a0]: Release: dc0c2c: 2=>1 [SinkContext::CloseContainer HTMLContentSink::CloseContainer CNavDTD::CloseContainer CNavDTD::CloseContainersTo CNavDTD::CloseContainersTo CNavDTD::HandleEndToken N 0[d526a0]: AddRef: dc0c2c: 1=>2 [nsGenericHTMLContainerElement::ChildAt nsHTMLOListElement::ChildAt HTMLStyleSheetImpl::ProcessChildren HTMLStyleSheetImpl::ConstructFrameByDisplayType HTMLStyleShee 0[d526a0]: AddRef: dc0c20: 2=>3 [nsHTMLLIElement::QueryInterface CSSStyleSheetImpl::RulesMatching StyleSetImpl::RulesMatching StyleSetImpl::ResolveStyleFor nsPresContext::ResolveStyleContextFor HTM 0[d526a0]: Release: dc0c2c: 3=>2 [CSSStyleSheetImpl::RulesMatching StyleSetImpl::RulesMatching StyleSetImpl::ResolveStyleFor nsPresContext::ResolveStyleContextFor HTMLStyleSheetImpl::ConstructFrame 0[d526a0]: AddRef: dc0c20: 2=>3 [nsHTMLLIElement::QueryInterface HTMLStyleSheetImpl::RulesMatching StyleSetImpl::RulesMatching StyleSetImpl::ResolveStyleFor nsPresContext::ResolveStyleContextFor HT 0[d526a0]: Release: dc0c2c: 3=>2 [HTMLStyleSheetImpl::RulesMatching StyleSetImpl::RulesMatching StyleSetImpl::ResolveStyleFor nsPresContext::ResolveStyleContextFor HTMLStyleSheetImpl::ConstructFram 0[d526a0]: AddRef: dc0c20: 2=>3 [nsHTMLLIElement::QueryInterface HTMLCSSStyleSheetImpl::RulesMatching StyleSetImpl::RulesMatching StyleSetImpl::ResolveStyleFor nsPresContext::ResolveStyleContextFor 0[d526a0]: Release: dc0c2c: 3=>2 [HTMLCSSStyleSheetImpl::RulesMatching StyleSetImpl::RulesMatching StyleSetImpl::ResolveStyleFor nsPresContext::ResolveStyleContextFor HTMLStyleSheetImpl::ConstructF 0[d526a0]: AddRef: dc0c2c: 2=>3 [nsFrame::nsFrame nsSplittableFrame::nsSplittableFrame nsContainerFrame::nsContainerFrame nsHTMLContainerFrame::nsHTMLContainerFrame nsBlockFrame::nsBlockFrame NS_Ne 0[d526a0]: AddRef: dc0c2c: 3=>4 [nsFrame::nsFrame BulletFrame::BulletFrame nsBlockFrame::Init HTMLStyleSheetImpl::ConstructFrameByDisplayType HTMLStyleSheetImpl::ConstructFrame HTMLStyleSheetImpl:: 0[d526a0]: Release: dc0c2c: 4=>3 [HTMLStyleSheetImpl::ProcessChildren HTMLStyleSheetImpl::ConstructFrameByDisplayType HTMLStyleSheetImpl::ConstructFrame HTMLStyleSheetImpl::ContentAppended StyleSet 0[d526a0]: AddRef: dc0c2c: 3=>4 [nsFrame::GetContent BulletFrame::SetListItemOrdinal nsBlockFrame::RenumberLists nsBlockFrame::ReflowAround nsInlineReflow::ReflowFrame nsInlineReflow::ReflowFrame n 0[d526a0]: AddRef: dc0c20: 4=>5 [nsHTMLLIElement::QueryInterface BulletFrame::SetListItemOrdinal nsBlockFrame::RenumberLists nsBlockFrame::ReflowAround nsInlineReflow::ReflowFrame nsInlineReflow::R 0[d526a0]: Release: dc0c2c: 5=>4 [BulletFrame::SetListItemOrdinal nsBlockFrame::RenumberLists nsBlockFrame::ReflowAround nsInlineReflow::ReflowFrame nsInlineReflow::ReflowFrame nsBlockFrame::Reflow 0[d526a0]: Release: dc0c2c: 4=>3 [BulletFrame::SetListItemOrdinal nsBlockFrame::RenumberLists nsBlockFrame::ReflowAround nsInlineReflow::ReflowFrame nsInlineReflow::ReflowFrame nsBlockFrame::Reflow 0[d526a0]: AddRef: dc0c20: 3=>4 [nsHTMLLIElement::QueryInterface nsBlockFrame::RenumberLists nsBlockFrame::ReflowAround nsInlineReflow::ReflowFrame nsInlineReflow::ReflowFrame nsBlockFrame::ReflowB 0[d526a0]: Release: dc0c2c: 4=>3 [nsBlockFrame::RenumberLists nsBlockFrame::ReflowAround nsInlineReflow::ReflowFrame nsInlineReflow::ReflowFrame nsBlockFrame::ReflowBlockFrame nsBlockFrame::ReflowL 0[d526a0]: Release: dc0c2c: 3=>2 [nsFrame::~nsFrame nsSplittableFrame::~nsSplittableFrame nsContainerFrame::~nsContainerFrame nsHTMLContainerFrame::~nsHTMLContainerFrame nsBlockFrame::~nsBlockFrame 0[d526a0]: Release: dc0c2c: 2=>1 [nsGenericHTMLContainerElement::~nsGenericHTMLContainerElement nsHTMLOListElement::~nsHTMLOListElement nsHTMLOListElement::`scalar deleting destructor' nsHTMLOListE If you whittle that done you'll see the unbalanced reference is here: 0[d526a0]: AddRef: dc0c2c: 3=>4 [nsFrame::nsFrame BulletFrame::BulletFrame nsBlockFrame::Init HTMLStyleSheetImpl::ConstructFrameByDisplayType HTMLStyleSheetImpl::ConstructFrame HTMLStyleSheetImpl::
Obviously that was a hastily written bug report: "I looked the" should be "It looked like the" (second paragraph). "If you whittle that done" should be "If you whittle that down" (next to last paragraph).
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
I fixed the block frame code to free up the bullet frame and therefore free up the bullet frame's content.
Requested verification of bug fix by 'assigned to' engineer.
Troy provide a test case for verification
still waiting for troy@netscape.com to do 1 of the following: 1) provide QA with a test case so we can mark it VERIFIED_FIXED 2) verify it himself and mark this bug VERIFIED-FIXED
QA Contact: 3819
will mark verified if reporter agrees with fix, tacit approval accepted
I agree
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.