Fixed a memory leak of a content object

This commit is contained in:
troy%netscape.com 1998-11-11 06:37:30 +00:00
Родитель 5c3b880066
Коммит e248cb0b50
6 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -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)) {

Просмотреть файл

@ -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);

Просмотреть файл

@ -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)) {

Просмотреть файл

@ -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);

Просмотреть файл

@ -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)) {

Просмотреть файл

@ -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);