зеркало из https://github.com/mozilla/pjs.git
Don't leak nsBoxToBlockAdaptors (bug 177807). r=varga, sr=dbaron.
This commit is contained in:
Родитель
60ddb74452
Коммит
ee38cee4fb
|
@ -1093,14 +1093,12 @@ nsBoxFrame::DoLayout(nsBoxLayoutState& aState)
|
|||
NS_IMETHODIMP
|
||||
nsBoxFrame::Destroy(nsIPresContext* aPresContext)
|
||||
{
|
||||
// if we are root remove 1 from the debug count.
|
||||
if (mState & NS_STATE_IS_ROOT)
|
||||
GetDebugPref(aPresContext);
|
||||
|
||||
// unregister access key
|
||||
RegUnregAccessKey(aPresContext, PR_FALSE);
|
||||
|
||||
SetLayoutManager(nsnull);
|
||||
// clean up the container box's layout manager and child boxes
|
||||
nsBoxLayoutState state(aPresContext);
|
||||
nsContainerBox::Destroy(state);
|
||||
|
||||
return nsContainerFrame::Destroy(aPresContext);
|
||||
}
|
||||
|
|
|
@ -85,6 +85,13 @@ nsContainerBox::~nsContainerBox()
|
|||
{
|
||||
}
|
||||
|
||||
void
|
||||
nsContainerBox::Destroy(nsBoxLayoutState& aState)
|
||||
{
|
||||
SetLayoutManager(nsnull);
|
||||
ClearChildren(aState);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_LAYOUT
|
||||
void
|
||||
nsContainerBox::GetBoxName(nsAutoString& aName)
|
||||
|
|
|
@ -53,6 +53,8 @@ public:
|
|||
nsContainerBox(nsIPresShell* aShell);
|
||||
virtual ~nsContainerBox();
|
||||
|
||||
void Destroy(nsBoxLayoutState& aState);
|
||||
|
||||
NS_IMETHOD SetLayoutManager(nsIBoxLayout* aLayout);
|
||||
NS_IMETHOD GetLayoutManager(nsIBoxLayout** aLayout);
|
||||
NS_IMETHOD GetPrefSize(nsBoxLayoutState& aBoxLayoutState, nsSize& aSize);
|
||||
|
|
Загрузка…
Ссылка в новой задаче