fix memory leaks (bug# 8221)

This commit is contained in:
pinkerton@netscape.com
1999-06-15 23:26:32 +00:00
parent 2550bbc81c
commit adfd1889c5
4 changed files with 14 additions and 12 deletions

View File

@@ -330,7 +330,7 @@ nsButtonFrameRenderer::ReResolveStyles(nsIPresContext& aPresContext)
// see if the outline has changed.
// nsCOMPtr<nsIStyleContext> oldOutline = mOutlineStyle;
nsCOMPtr<nsIAtom> atom (do_QueryInterface(NS_NewAtom(":-moz-outline")));
nsCOMPtr<nsIAtom> atom ( getter_AddRefs(NS_NewAtom(":-moz-outline")) );
aPresContext.ProbePseudoStyleContextFor(content, atom, context,
PR_FALSE,
getter_AddRefs(mOutlineStyle));
@@ -344,7 +344,7 @@ nsButtonFrameRenderer::ReResolveStyles(nsIPresContext& aPresContext)
*/
// style for the inner such as a dotted line (Windows)
atom = do_QueryInterface(NS_NewAtom(":-moz-focus-inner"));
atom = getter_AddRefs(NS_NewAtom(":-moz-focus-inner"));
aPresContext.ProbePseudoStyleContextFor(content, atom, context,
PR_FALSE,
getter_AddRefs(mInnerFocusStyle));
@@ -352,7 +352,7 @@ nsButtonFrameRenderer::ReResolveStyles(nsIPresContext& aPresContext)
// style for outer focus like a ridged border (MAC).
atom = do_QueryInterface(NS_NewAtom(":-moz-focus-outer"));
atom = getter_AddRefs(NS_NewAtom(":-moz-focus-outer"));
aPresContext.ProbePseudoStyleContextFor(content, atom, context,
PR_FALSE,
getter_AddRefs(mOuterFocusStyle));