nsCOMPtr<nsIDOMSelectionListener> thisListener;
nsRangeList::NotifySelectionListeners(){  if (!mSelectionListeners)    return NS_ERROR_FAILURE;   if (GetBatching()){    SetDirty();    return NS_OK;  }  PRUint32 cnt;  nsresult rv = mSelectionListeners->Count(&cnt);  if (NS_FAILED(rv)) return rv;  for (PRUint32 i = 0; i < cnt;i++)  {    nsCOMPtr<nsIDOMSelectionListener> thisListener;    nsCOMPtr<nsISupports> isupports(dont_AddRef(mSelectionListeners->ElementAt(i)));    thisListener = do_QueryInterface(isupports);    if (thisListener)    	thisListener->NotifySelectionChanged();  }	return NS_OK;}