nsIDOMSelection* tmp = this; *aInstancePtr = (void*) tmp; NS_ADDREF_THIS();
*aInstancePtr = (void *)mRangeList; NS_ADDREF(mRangeList);
nsRangeList::QueryInterface(REFNSIID aIID, void** aInstancePtr){  if (NULL == aInstancePtr) {    return NS_ERROR_NULL_POINTER;  }  if (aIID.Equals(kIDOMSelectionIID)) {    nsIDOMSelection* tmp = this;    *aInstancePtr = (void*) tmp;    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(kIFrameSelectionIID)) {    nsIFrameSelection* tmp = this;    *aInstancePtr = (void*) tmp;    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(kIEnumeratorIID)) {    nsRangeListIterator *iterator =  new nsRangeListIterator(this);    return iterator->QueryInterface(kIEnumeratorIID, aInstancePtr);  }  if (aIID.Equals(kISupportsIID)) {    // use *first* base class for ISupports    nsIFrameSelection* tmp1 = this;    nsISupports* tmp2 = tmp1;    *aInstancePtr = (void*) tmp2;    NS_ADDREF_THIS();    return NS_OK;  }  return NS_NOINTERFACE;}