if (aIID.Equals(NS_GET_IID(nsIFrameSelection))) { nsIFrameSelection* tmp = this;
if (aIID.Equals(NS_GET_IID(nsISupports))) { nsIDOMSelection *temp = (nsIDOMSelection *)this; *aInstancePtr = (void*)(nsISupports *)temp; NS_ADDREF_THIS(); return NS_OK; } if (aIID.Equals(NS_GET_IID(nsIDOMSelection))) { *aInstancePtr = (void*) this; NS_ADDREF_THIS(); return NS_OK; }    if (aIID.Equals(NS_GET_IID(nsIEnumerator)) || aIID.Equals(NS_GET_IID(nsIBidirectionalEnumerator))) { NS_ASSERTION(0, "(tell scc or mjudge) -- Error: Get new enumerators with |GetEnumerator|, not |QueryInterface|!  Caller must be fixed"); return NS_NOINTERFACE; }   if (aIID.Equals(NS_GET_IID(nsIScriptObjectOwner))) { nsIScriptObjectOwner* tmp = this;
nsSelection::QueryInterface(REFNSIID aIID, void** aInstancePtr){  if (nsnull == aInstancePtr) {    return NS_ERROR_NULL_POINTER;  }  if (aIID.Equals(NS_GET_IID(nsIFrameSelection))) {    nsIFrameSelection* tmp = this;    *aInstancePtr = (void*) tmp;    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(NS_GET_IID(nsISupports))) {    // use *first* base class for ISupports    nsIFrameSelection* tmp1 = this;    nsISupports* tmp2 = tmp1;    *aInstancePtr = (void*) tmp2;    NS_ADDREF_THIS();    return NS_OK;  }  NS_ASSERTION(PR_FALSE,"bad query interface in FrameSelection");  return NS_NOINTERFACE;}