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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user