mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-07 23:43:37 +00:00
Eliminate a memory leak of a style context (which ends up leaking all the stylecontexts upward)
This commit is contained in:
parent
23cdb1131e
commit
4b19ca3266
@ -2746,11 +2746,11 @@ nsCSSFrameConstructor::ConstructButtonLabelFrame(nsIPresContext *aPresContext,
|
||||
// content:"Reset";
|
||||
// }
|
||||
nsresult rv = NS_OK;
|
||||
nsIStyleContext* styleContext = nsnull;
|
||||
nsCOMPtr<nsIStyleContext> styleContext;
|
||||
nsIFrame* generatedFrame = nsnull;
|
||||
|
||||
// Probe for generated content before
|
||||
aFrame->GetStyleContext(&styleContext);
|
||||
aFrame->GetStyleContext(getter_AddRefs(styleContext));
|
||||
if (CreateGeneratedContentFrame(aPresContext, aState, aFrame, aContent,
|
||||
styleContext, nsCSSAtoms::buttonLabelPseudo,
|
||||
PR_FALSE, PR_FALSE, &generatedFrame)) {
|
||||
|
@ -2746,11 +2746,11 @@ nsCSSFrameConstructor::ConstructButtonLabelFrame(nsIPresContext *aPresContext,
|
||||
// content:"Reset";
|
||||
// }
|
||||
nsresult rv = NS_OK;
|
||||
nsIStyleContext* styleContext = nsnull;
|
||||
nsCOMPtr<nsIStyleContext> styleContext;
|
||||
nsIFrame* generatedFrame = nsnull;
|
||||
|
||||
// Probe for generated content before
|
||||
aFrame->GetStyleContext(&styleContext);
|
||||
aFrame->GetStyleContext(getter_AddRefs(styleContext));
|
||||
if (CreateGeneratedContentFrame(aPresContext, aState, aFrame, aContent,
|
||||
styleContext, nsCSSAtoms::buttonLabelPseudo,
|
||||
PR_FALSE, PR_FALSE, &generatedFrame)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user