if (ioService == nsnull) { (void)nsServiceManager::ReleaseService(kIOServiceCID, serv); }  *result = channel;
*result = inStr;
NS_OpenURI(nsIChannel* *result,            nsIURI* uri,           nsIIOService* ioService = nsnull,    // pass in nsIIOService to optimize callers           nsILoadGroup* loadGroup = nsnull,           nsIInterfaceRequestor* notificationCallbacks = nsnull,           nsLoadFlags loadAttributes = nsIChannel::LOAD_NORMAL,           PRUint32 bufferSegmentSize = 0,            PRUint32 bufferMaxSize = 0){    nsresult rv;    nsIIOService* serv = ioService;    static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);    if (serv == nsnull) {        rv = nsServiceManager::GetService(kIOServiceCID, NS_GET_IID(nsIIOService),                                          (nsISupports**)&serv);        if (NS_FAILED(rv)) return rv;    }    nsIChannel* channel = nsnull;    rv = serv->NewChannelFromURI(uri, &channel);    if (NS_FAILED(rv)) return rv;    if (loadGroup) {        rv = channel->SetLoadGroup(loadGroup);        if (NS_FAILED(rv)) return rv;    }    if (notificationCallbacks) {        rv = channel->SetNotificationCallbacks(notificationCallbacks);        if (NS_FAILED(rv)) return rv;    }    if (loadAttributes != nsIChannel::LOAD_NORMAL) {        rv = channel->SetLoadAttributes(loadAttributes);        if (NS_FAILED(rv)) return rv;    }    if (bufferSegmentSize != 0) {        rv = channel->SetBufferSegmentSize(bufferSegmentSize);        if (NS_FAILED(rv)) return rv;    }    if (bufferMaxSize != 0) {        rv = channel->SetBufferMaxSize(bufferMaxSize);        if (NS_FAILED(rv)) return rv;    }    if (ioService == nsnull) {        (void)nsServiceManager::ReleaseService(kIOServiceCID, serv);    }    *result = channel;    return rv;}