nsIInputStream* inStr; rv = channel->Open(&inStr); if (NS_FAILED(rv)) return rv;  *result = inStr;
rv = channel->AsyncOpen(aConsumer, context);
NS_OpenURI(nsIInputStream* *result,           nsIURI* uri,           nsIIOService* ioService = nsnull,     // pass in nsIIOService to optimize callers           nsILoadGroup* loadGroup = nsnull,           nsIInterfaceRequestor* notificationCallbacks = nsnull,           nsLoadFlags loadAttributes = NS_STATIC_CAST(nsLoadFlags, nsIRequest::LOAD_NORMAL)){    nsresult rv;    nsCOMPtr<nsIChannel> channel;    rv = NS_OpenURI(getter_AddRefs(channel), uri, ioService,                    loadGroup, notificationCallbacks, loadAttributes);    if (NS_FAILED(rv)) return rv;    nsIInputStream* inStr;    rv = channel->Open(&inStr);    if (NS_FAILED(rv)) return rv;    *result = inStr;    return rv;}