From 90d9b37641a512ccb7e3010ef0ee774f0393e6db Mon Sep 17 00:00:00 2001 From: "pollmann%netscape.com" Date: Wed, 23 Feb 2000 21:24:07 +0000 Subject: [PATCH] Bug 28691: Fix existing leak that my fix for bug 16999 hilighted. r=harishd a=rickg --- layout/base/nsCSSFrameConstructor.cpp | 5 ++--- layout/html/style/src/nsCSSFrameConstructor.cpp | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index b9b8674be9ed..9cd89953f33d 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -814,9 +814,9 @@ nsCSSFrameConstructor::CreateGeneratedContentFrame(nsIPresShell* aPresShe *aResult = nsnull; // initialize OUT parameter // Probe for the existence of the pseudo-element - nsIStyleContext* pseudoStyleContext; + nsCOMPtr pseudoStyleContext; aPresContext->ProbePseudoStyleContextFor(aContent, aPseudoElement, aStyleContext, - PR_FALSE, &pseudoStyleContext); + PR_FALSE, getter_AddRefs(pseudoStyleContext)); if (pseudoStyleContext) { const nsStyleDisplay* display; @@ -934,7 +934,6 @@ nsCSSFrameConstructor::CreateGeneratedContentFrame(nsIPresShell* aPresShe } NS_RELEASE(textStyleContext); - NS_RELEASE(pseudoStyleContext); if (childFrames.childList) { containerFrame->SetInitialChildList(aPresContext, nsnull, childFrames.childList); } diff --git a/layout/html/style/src/nsCSSFrameConstructor.cpp b/layout/html/style/src/nsCSSFrameConstructor.cpp index b9b8674be9ed..9cd89953f33d 100644 --- a/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -814,9 +814,9 @@ nsCSSFrameConstructor::CreateGeneratedContentFrame(nsIPresShell* aPresShe *aResult = nsnull; // initialize OUT parameter // Probe for the existence of the pseudo-element - nsIStyleContext* pseudoStyleContext; + nsCOMPtr pseudoStyleContext; aPresContext->ProbePseudoStyleContextFor(aContent, aPseudoElement, aStyleContext, - PR_FALSE, &pseudoStyleContext); + PR_FALSE, getter_AddRefs(pseudoStyleContext)); if (pseudoStyleContext) { const nsStyleDisplay* display; @@ -934,7 +934,6 @@ nsCSSFrameConstructor::CreateGeneratedContentFrame(nsIPresShell* aPresShe } NS_RELEASE(textStyleContext); - NS_RELEASE(pseudoStyleContext); if (childFrames.childList) { containerFrame->SetInitialChildList(aPresContext, nsnull, childFrames.childList); }