mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-02 03:49:37 +00:00
don't crash when there is bad XML
This commit is contained in:
parent
9a23850613
commit
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user