rv = NS_OpenURI(getter_AddRefs(channel), aURL, aLoadGroup, eventSinkGetter);
rv = NS_OpenURI(getter_AddRefs(channel), aURL, aLoadGroup, capabilities);
nsresult nsDocumentBindInfo::Bind(nsIURI* aURL,                                   nsILoadGroup *aLoadGroup,                                  nsIInputStream *postDataStream,                                  const PRUnichar* aReferrer){  nsresult rv = NS_OK;  // XXXbe this knows that m_Container implements nsIWebShell  nsCOMPtr<nsIWebShell> webShell = do_QueryInterface(m_Container);  nsCOMPtr<nsIEventSinkGetter> eventSinkGetter = new nsWebShellEventSinkGetter(webShell);  if (!eventSinkGetter)    return NS_ERROR_OUT_OF_MEMORY;  nsCOMPtr<nsIChannel> channel;  rv = NS_OpenURI(getter_AddRefs(channel), aURL, aLoadGroup, eventSinkGetter);  if (NS_FAILED(rv)) return rv;  if (postDataStream || aReferrer)  {      nsCOMPtr<nsIHTTPChannel> httpChannel(do_QueryInterface(channel));      if (httpChannel)      {          if (postDataStream) {              httpChannel->SetRequestMethod(HM_POST);              httpChannel->SetPostDataStream(postDataStream);          }          if (aReferrer) {              // Referer - misspelled, but per the HTTP spec              nsCAutoString str = aReferrer;              nsCOMPtr<nsIAtom> key = NS_NewAtom("referer");              httpChannel->SetRequestHeader(key, str.GetBuffer());          }      }  }  m_DocLoader->SetDocumentChannel(channel);  rv = channel->AsyncRead(0, -1, nsnull, this);  return rv;}