GetSelect(*getter_AddRefs(selectElement));
GetSelect(getter_AddRefs(selectElement));
nsHTMLOptionElement::GetIndex(PRInt32* aIndex){  NS_ENSURE_ARG_POINTER(aIndex);  *aIndex = -1; // -1 indicates the index was not found  // Get our containing select content object.  nsCOMPtr<nsIDOMHTMLSelectElement> selectElement;  GetSelect(*getter_AddRefs(selectElement));  if (selectElement) {    // Get the options from the select object.    nsCOMPtr<nsIDOMHTMLCollection> options;    selectElement->GetOptions(getter_AddRefs(options));    if (options) {      // Walk the options to find out where we are in the list (ick, O(n))      PRUint32 length = 0;      options->GetLength(&length);      nsCOMPtr<nsIDOMNode> thisOption;      for (PRUint32 i = 0; i < length; i++) {        options->Item(i, getter_AddRefs(thisOption));        if (thisOption.get() == NS_STATIC_CAST(nsIDOMNode *, this)) {          *aIndex = i;          break;        }      }    }  }  return NS_OK;}