mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-06 08:40:56 +00:00
Added some calls to NS_RELEASE() when exiting the function
This commit is contained in:
parent
54af0f86f2
commit
81e0cb7584
@ -248,6 +248,7 @@ nsInputFrame::Reflow(nsIPresContext& aPresContext,
|
||||
}
|
||||
nsIPresShell *presShell = aPresContext.GetShell(); // need to release
|
||||
nsIViewManager *viewMan = presShell->GetViewManager(); // need to release
|
||||
NS_RELEASE(presShell);
|
||||
|
||||
GetDesiredSize(&aPresContext, aReflowState, aDesiredSize, mWidgetSize);
|
||||
|
||||
@ -272,6 +273,8 @@ nsInputFrame::Reflow(nsIPresContext& aPresContext,
|
||||
if (NS_OK != result) {
|
||||
NS_ASSERTION(0, "widget initialization failed");
|
||||
aStatus = NS_FRAME_NOT_COMPLETE;
|
||||
NS_IF_RELEASE(parView);
|
||||
NS_IF_RELEASE(viewMan);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -293,7 +296,6 @@ nsInputFrame::Reflow(nsIPresContext& aPresContext,
|
||||
|
||||
NS_IF_RELEASE(parView);
|
||||
NS_IF_RELEASE(viewMan);
|
||||
NS_IF_RELEASE(presShell);
|
||||
}
|
||||
else {
|
||||
GetDesiredSize(&aPresContext, aReflowState, aDesiredSize, mWidgetSize);
|
||||
|
Loading…
x
Reference in New Issue
Block a user