rv = loader->Init(uri, observer, context, loadGroup, notificationCallbacks, loadFlags, referrer);  if (NS_FAILED(rv)) return rv; *result = loader; NS_ADDREF(*result); return rv;
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(channel)); if (httpChannel) httpChannel->SetReferrer(referrer);  return NS_NewStreamLoader(result, channel, observer, context);
NS_NewStreamLoader(nsIStreamLoader **result,                   nsIURI *uri,                   nsIStreamLoaderObserver *observer,                   nsISupports *context,                   nsILoadGroup *loadGroup,                   nsIInterfaceRequestor *notificationCallbacks,                   PRUint32 loadFlags,                   nsIURI *referrer){    nsresult rv;    nsCOMPtr<nsIStreamLoader> loader;    static NS_DEFINE_CID(kStreamLoaderCID, NS_STREAMLOADER_CID);    rv = nsComponentManager::CreateInstance(kStreamLoaderCID,                                            nsnull,                                            NS_GET_IID(nsIStreamLoader),                                            getter_AddRefs(loader));    if (NS_FAILED(rv)) return rv;    rv = loader->Init(uri, observer, context, loadGroup,                      notificationCallbacks, loadFlags, referrer);                          if (NS_FAILED(rv)) return rv;    *result = loader;    NS_ADDREF(*result);    return rv;}