Bug 28691: Fix existing leak that my fix for bug 16999 hilighted. r=harishd a=rickg

This commit is contained in:
pollmann%netscape.com 2000-02-23 21:24:07 +00:00
parent d4293a9bc7
commit 90d9b37641
2 changed files with 4 additions and 6 deletions

View File

@ -814,9 +814,9 @@ nsCSSFrameConstructor::CreateGeneratedContentFrame(nsIPresShell* aPresShe
*aResult = nsnull; // initialize OUT parameter
// Probe for the existence of the pseudo-element
nsIStyleContext* pseudoStyleContext;
nsCOMPtr<nsIStyleContext> 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);
}

View File

@ -814,9 +814,9 @@ nsCSSFrameConstructor::CreateGeneratedContentFrame(nsIPresShell* aPresShe
*aResult = nsnull; // initialize OUT parameter
// Probe for the existence of the pseudo-element
nsIStyleContext* pseudoStyleContext;
nsCOMPtr<nsIStyleContext> 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);
}