зеркало из https://github.com/mozilla/gecko-dev.git
Correct a leaky code-path in my earlier check-in
This commit is contained in:
Родитель
933358fa1c
Коммит
3a170d2967
|
@ -2815,7 +2815,11 @@ nsBlockFrame::GetTopBlockChild()
|
||||||
while (--n >= 0) {
|
while (--n >= 0) {
|
||||||
nsIContent* content;
|
nsIContent* content;
|
||||||
nsresult rv = firstChild->GetContent(&content);
|
nsresult rv = firstChild->GetContent(&content);
|
||||||
if (NS_FAILED(rv) || !content || !content->IsContentOfType(nsIContent::eTEXT)) {
|
if (NS_FAILED(rv) || !content) {
|
||||||
|
return nsnull;
|
||||||
|
}
|
||||||
|
if (!content->IsContentOfType(nsIContent::eTEXT)) {
|
||||||
|
NS_RELEASE(content);
|
||||||
return nsnull;
|
return nsnull;
|
||||||
}
|
}
|
||||||
nsITextContent* tc;
|
nsITextContent* tc;
|
||||||
|
|
|
@ -2815,7 +2815,11 @@ nsBlockFrame::GetTopBlockChild()
|
||||||
while (--n >= 0) {
|
while (--n >= 0) {
|
||||||
nsIContent* content;
|
nsIContent* content;
|
||||||
nsresult rv = firstChild->GetContent(&content);
|
nsresult rv = firstChild->GetContent(&content);
|
||||||
if (NS_FAILED(rv) || !content || !content->IsContentOfType(nsIContent::eTEXT)) {
|
if (NS_FAILED(rv) || !content) {
|
||||||
|
return nsnull;
|
||||||
|
}
|
||||||
|
if (!content->IsContentOfType(nsIContent::eTEXT)) {
|
||||||
|
NS_RELEASE(content);
|
||||||
return nsnull;
|
return nsnull;
|
||||||
}
|
}
|
||||||
nsITextContent* tc;
|
nsITextContent* tc;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче