NS_PRECONDITION(nsnull != aInstancePtrResult, "null pointer"); if (nsnull == aInstancePtrResult) { return NS_ERROR_NULL_POINTER; }  *aInstancePtrResult = NULL;  if (aIID.Equals(kIStreamObserverIID)) { *aInstancePtrResult = (void*) ((nsIStreamObserver*)this); NS_ADDREF_THIS(); return NS_OK; } if (aIID.Equals(kIStreamListenerIID)) { *aInstancePtrResult = (void*) ((nsIStreamListener*)this); NS_ADDREF_THIS(); return NS_OK; } if (aIID.Equals(kDocumentBindInfoIID)) { *aInstancePtrResult = (void*) this; NS_ADDREF_THIS(); return NS_OK; } #if 0 if (aIID.Equals(kRefreshURLIID)) { *aInstancePtrResult = (void*) ((nsIRefreshUrl*)this); NS_ADDREF_THIS(); return NS_OK; } #endif  return NS_NOINTERFACE;
if (NULL == aInstancePtr) { return NS_ERROR_NULL_POINTER; } if (aIID.Equals(kIDocumentLoaderIID)) { *aInstancePtr = (void*)(nsIDocumentLoader*)this; NS_ADDREF_THIS(); return NS_OK; } if (aIID.Equals(nsCOMTypeInfo<nsILoadGroupListenerFactory>::GetIID())) { *aInstancePtr = (void*)(nsILoadGroupListenerFactory*)this; NS_ADDREF_THIS(); return NS_OK; } if (aIID.Equals(kIStreamObserverIID)) { *aInstancePtr = (void*)(nsIStreamObserver*)this; NS_ADDREF_THIS(); return NS_OK; } if (aIID.Equals(nsCOMTypeInfo<nsISupportsWeakReference>::GetIID())) { *aInstancePtr = NS_STATIC_CAST(nsISupportsWeakReference*,this); NS_ADDREF_THIS(); return NS_OK; } return NS_NOINTERFACE;
nsDocumentBindInfo::QueryInterface(const nsIID& aIID,                                   void** aInstancePtrResult){  NS_PRECONDITION(nsnull != aInstancePtrResult, "null pointer");  if (nsnull == aInstancePtrResult) {    return NS_ERROR_NULL_POINTER;  }  *aInstancePtrResult = NULL;  if (aIID.Equals(kIStreamObserverIID)) {    *aInstancePtrResult = (void*) ((nsIStreamObserver*)this);    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(kIStreamListenerIID)) {    *aInstancePtrResult = (void*) ((nsIStreamListener*)this);    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(kDocumentBindInfoIID)) {    *aInstancePtrResult = (void*) this;    NS_ADDREF_THIS();    return NS_OK;  }#if 0  if (aIID.Equals(kRefreshURLIID)) {    *aInstancePtrResult = (void*) ((nsIRefreshUrl*)this);    NS_ADDREF_THIS();    return NS_OK;  }#endif /* 0 */  return NS_NOINTERFACE;}