mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
changed conditional NS_RELEASE to NS_IF_RELEASE to fix memory leak
This commit is contained in:
parent
4a7f7b54e2
commit
49bded7631
@ -286,7 +286,6 @@ nsScrollFrame::CreateScrollingView(nsIPresContext& aPresContext)
|
||||
nsIAtom* frameType = nsnull;
|
||||
parent->GetFrameType(&frameType);
|
||||
if (nsLayoutAtoms::viewportFrame == frameType) {
|
||||
NS_RELEASE(frameType);
|
||||
nsCOMPtr<nsISupports> container;
|
||||
rv = aPresContext.GetContainer(getter_AddRefs(container));
|
||||
if (NS_SUCCEEDED(rv) && container) {
|
||||
@ -305,6 +304,7 @@ nsScrollFrame::CreateScrollingView(nsIPresContext& aPresContext)
|
||||
}
|
||||
}
|
||||
}
|
||||
NS_IF_RELEASE(frameType);
|
||||
scrollingView->SetScrollPreference(scrollPref);
|
||||
|
||||
// Set the scrolling view's insets to whatever our border is
|
||||
|
Loading…
Reference in New Issue
Block a user