Fix leak (within the pres shell arena) of lines from nsLineBox::DeleteLineList. b=136764 r=attinasi sr=waterson

git-svn-id: svn://10.0.0.236/trunk@118934 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%fas.harvard.edu
2002-04-13 18:54:40 +00:00
parent 898c22feac
commit fee86da3b9
2 changed files with 12 additions and 6 deletions

View File

@@ -312,11 +312,14 @@ nsLineBox::DeleteLineList(nsIPresContext* aPresContext, nsLineList& aLines)
child = nextChild;
}
while (! aLines.empty()) {
nsCOMPtr<nsIPresShell> shell;
aPresContext->GetShell(getter_AddRefs(shell));
do {
nsLineBox* line = aLines.front();
aLines.pop_front();
delete line;
}
line->Destroy(shell);
} while (! aLines.empty());
}
}

View File

@@ -312,11 +312,14 @@ nsLineBox::DeleteLineList(nsIPresContext* aPresContext, nsLineList& aLines)
child = nextChild;
}
while (! aLines.empty()) {
nsCOMPtr<nsIPresShell> shell;
aPresContext->GetShell(getter_AddRefs(shell));
do {
nsLineBox* line = aLines.front();
aLines.pop_front();
delete line;
}
line->Destroy(shell);
} while (! aLines.empty());
}
}