don't crash when there is bad XML
git-svn-id: svn://10.0.0.236/trunk@67672 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user