nsDOMSelection::QueryInterface(REFNSIID aIID, void** aInstancePtr)
nsRangeList::QueryInterface(REFNSIID aIID, void** aInstancePtr)
nsDOMSelection::QueryInterface(REFNSIID aIID, void** aInstancePtr){  if (nsnull == aInstancePtr) {    return NS_ERROR_NULL_POINTER;  }  if (aIID.Equals(nsCOMTypeInfo<nsISupports>::GetIID())) {    nsIDOMSelection *temp = (nsIDOMSelection *)this;    *aInstancePtr = (void*)(nsISupports *)temp;    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(nsIDOMSelection::GetIID())) {    *aInstancePtr = (void*) this;    NS_ADDREF_THIS();    return NS_OK;  }    /* The following clause needs to go away, as soon as we've caught any offending callers */  if (aIID.Equals(nsIEnumerator::GetIID())   || aIID.Equals(nsIBidirectionalEnumerator::GetIID())) {  	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(nsIScriptObjectOwner::GetIID())) {    nsIScriptObjectOwner* tmp = this;    *aInstancePtr = (void*) tmp;    NS_ADDREF_THIS();    return NS_OK;  }  //NS_ASSERTION(PR_FALSE,"bad query interface in nsDOMSelection");  //do not assert here javascript will assert here sometimes thats OK  return NS_NOINTERFACE;}