зеркало из https://github.com/mozilla/gecko-dev.git
Change NS_SUCCEEDED check to null-check since GetDocument may return a null document. r=jag sr=waterson b=99056
This commit is contained in:
Родитель
917fff3b3e
Коммит
9904d904df
|
@ -1515,8 +1515,8 @@ nsBulletFrame::GetBaseURI(nsIURI **aURI)
|
|||
}
|
||||
else {
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
rv = mContent->GetDocument(*getter_AddRefs(doc));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mContent->GetDocument(*getter_AddRefs(doc));
|
||||
if (doc) {
|
||||
doc->GetBaseURL(*getter_AddRefs(baseURI));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1515,8 +1515,8 @@ nsBulletFrame::GetBaseURI(nsIURI **aURI)
|
|||
}
|
||||
else {
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
rv = mContent->GetDocument(*getter_AddRefs(doc));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mContent->GetDocument(*getter_AddRefs(doc));
|
||||
if (doc) {
|
||||
doc->GetBaseURL(*getter_AddRefs(baseURI));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -516,8 +516,8 @@ nsImageBoxFrame::GetBaseURI(nsIURI **uri)
|
|||
}
|
||||
else {
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
rv = mContent->GetDocument(*getter_AddRefs(doc));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mContent->GetDocument(*getter_AddRefs(doc));
|
||||
if (doc) {
|
||||
doc->GetBaseURL(*getter_AddRefs(baseURI));
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче