nsIFormControl *control = (nsIFormControl*)mElements.ElementAt(aIndex); if (control) { return control->QueryInterface(kIDOMNodeIID, (void**)aReturn);
if (mControls) { nsIDOMNode *node; nsresult result = mControls->Item(aIndex, &node); if ((NS_OK == result) && (nsnull != node)) { result = node->QueryInterface(kIDOMElementIID, (void **)aReturn); NS_RELEASE(node); } else { *aReturn = nsnull; } return result;
nsFormControlList::Item(PRUint32 aIndex, nsIDOMNode** aReturn){  nsIFormControl *control = (nsIFormControl*)mElements.ElementAt(aIndex);  if (control) {    return control->QueryInterface(kIDOMNodeIID, (void**)aReturn); // keep the ref  }  *aReturn = nsnull;  return NS_OK;}