mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
XForms bug 284169 - get rid of WARNING's in console generated by GetTypeForControl. Patch by aaronr@us.ibm.com, r=beaufour,allan
This commit is contained in:
parent
ea300e58e1
commit
058ed9baa2
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user