XForms bug 284169 - get rid of WARNING's in console generated by GetTypeForControl. Patch by aaronr@us.ibm.com, r=beaufour,allan

git-svn-id: svn://10.0.0.236/trunk@170043 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
doronr%us.ibm.com
2005-03-01 16:15:34 +00:00
parent 44dfc34fa7
commit b428562cf9

View File

@@ -773,7 +773,12 @@ nsXFormsModelElement::GetTypeForControl(nsIXFormsControl *aControl,
nsCOMPtr<nsIDOMNode> boundNode;
aControl->GetBoundNode(getter_AddRefs(boundNode));
NS_ENSURE_TRUE(boundNode, NS_ERROR_FAILURE);
if (!boundNode) {
// if the control isn't bound to instance data, it doesn't make sense to
// return a type. It is perfectly valid for there to be no bound node,
// so no need to use an NS_ENSURE_xxx macro, either.
return NS_ERROR_FAILURE;
}
nsAutoString schemaTypeName, schemaTypeNamespace;
nsresult rv = GetTypeAndNSFromNode(boundNode, schemaTypeName,