Fixed a memory leak of a content object

This commit is contained in:
troy%netscape.com 1998-11-11 06:37:30 +00:00
parent 13a2ed25a3
commit 690b52766a
6 changed files with 9 additions and 9 deletions

View File

@ -881,7 +881,7 @@ static void ContentEnumFunc(nsICSSStyleRule* aRule, void* aData)
content->GetParent(content);
NS_IF_RELEASE(lastContent);
}
NS_IF_RELEASE(lastContent);
NS_IF_RELEASE(content);
if (nsnull == selector) { // ran out, it matched
nsIStyleRule* iRule;
if (NS_OK == aRule->QueryInterface(kIStyleRuleIID, (void**)&iRule)) {

View File

@ -1391,8 +1391,8 @@ PRBool
HTMLStyleSheetImpl::IsScrollable(nsIPresContext* aPresContext, const nsStyleDisplay* aDisplay)
{
// For the time being it's scrollable if the overflow property is auto or
// scroll, regardless of whether the width or height is fixed in size
PRInt32 scrolling = -1;
// scroll, regardless of whether the width or height is fixed in size
PRInt32 scrolling = -1;
nsISupports* container;
if (nsnull != aPresContext) {
aPresContext->GetContainer(&container);

View File

@ -881,7 +881,7 @@ static void ContentEnumFunc(nsICSSStyleRule* aRule, void* aData)
content->GetParent(content);
NS_IF_RELEASE(lastContent);
}
NS_IF_RELEASE(lastContent);
NS_IF_RELEASE(content);
if (nsnull == selector) { // ran out, it matched
nsIStyleRule* iRule;
if (NS_OK == aRule->QueryInterface(kIStyleRuleIID, (void**)&iRule)) {

View File

@ -1391,8 +1391,8 @@ PRBool
HTMLStyleSheetImpl::IsScrollable(nsIPresContext* aPresContext, const nsStyleDisplay* aDisplay)
{
// For the time being it's scrollable if the overflow property is auto or
// scroll, regardless of whether the width or height is fixed in size
PRInt32 scrolling = -1;
// scroll, regardless of whether the width or height is fixed in size
PRInt32 scrolling = -1;
nsISupports* container;
if (nsnull != aPresContext) {
aPresContext->GetContainer(&container);

View File

@ -881,7 +881,7 @@ static void ContentEnumFunc(nsICSSStyleRule* aRule, void* aData)
content->GetParent(content);
NS_IF_RELEASE(lastContent);
}
NS_IF_RELEASE(lastContent);
NS_IF_RELEASE(content);
if (nsnull == selector) { // ran out, it matched
nsIStyleRule* iRule;
if (NS_OK == aRule->QueryInterface(kIStyleRuleIID, (void**)&iRule)) {

View File

@ -1391,8 +1391,8 @@ PRBool
HTMLStyleSheetImpl::IsScrollable(nsIPresContext* aPresContext, const nsStyleDisplay* aDisplay)
{
// For the time being it's scrollable if the overflow property is auto or
// scroll, regardless of whether the width or height is fixed in size
PRInt32 scrolling = -1;
// scroll, regardless of whether the width or height is fixed in size
PRInt32 scrolling = -1;
nsISupports* container;
if (nsnull != aPresContext) {
aPresContext->GetContainer(&container);