зеркало из https://github.com/mozilla/gecko-dev.git
don't crash when there is bad XML
This commit is contained in:
Родитель
9a23850613
Коммит
d7ad51a9fd
|
@ -948,12 +948,14 @@ nsXBLBinding::GetBaseTag(nsIAtom** aResult)
|
|||
if (xmlContent) {
|
||||
xmlContent->GetContainingNameSpace(*getter_AddRefs(nameSpace));
|
||||
|
||||
nsCOMPtr<nsINameSpace> tagSpace;
|
||||
nameSpace->FindNameSpace(prefixAtom, *getter_AddRefs(tagSpace));
|
||||
if (tagSpace) {
|
||||
// Score! Return the tag.
|
||||
if (nameSpace) {
|
||||
nsCOMPtr<nsINameSpace> tagSpace;
|
||||
nameSpace->FindNameSpace(prefixAtom, *getter_AddRefs(tagSpace));
|
||||
if (tagSpace) {
|
||||
// Score! Return the tag.
|
||||
// XXX We should really return the namespace as well.
|
||||
*aResult = NS_NewAtom(extends); // The addref happens here
|
||||
*aResult = NS_NewAtom(extends); // The addref happens here
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -948,12 +948,14 @@ nsXBLBinding::GetBaseTag(nsIAtom** aResult)
|
|||
if (xmlContent) {
|
||||
xmlContent->GetContainingNameSpace(*getter_AddRefs(nameSpace));
|
||||
|
||||
nsCOMPtr<nsINameSpace> tagSpace;
|
||||
nameSpace->FindNameSpace(prefixAtom, *getter_AddRefs(tagSpace));
|
||||
if (tagSpace) {
|
||||
// Score! Return the tag.
|
||||
if (nameSpace) {
|
||||
nsCOMPtr<nsINameSpace> tagSpace;
|
||||
nameSpace->FindNameSpace(prefixAtom, *getter_AddRefs(tagSpace));
|
||||
if (tagSpace) {
|
||||
// Score! Return the tag.
|
||||
// XXX We should really return the namespace as well.
|
||||
*aResult = NS_NewAtom(extends); // The addref happens here
|
||||
*aResult = NS_NewAtom(extends); // The addref happens here
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче