Let the consumer have a look at the channel we opened if they want (e.g. if

they want its owner).  Bug 369242, r+sr=biesi


git-svn-id: svn://10.0.0.236/trunk@219473 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2007-02-04 18:03:13 +00:00
parent 947a2c2019
commit 1abd4f2810

View File

@@ -199,7 +199,8 @@ NS_OpenURI(nsIInputStream **result,
nsIIOService *ioService = nsnull, // pass in nsIIOService to optimize callers
nsILoadGroup *loadGroup = nsnull,
nsIInterfaceRequestor *callbacks = nsnull,
PRUint32 loadFlags = nsIRequest::LOAD_NORMAL)
PRUint32 loadFlags = nsIRequest::LOAD_NORMAL,
nsIChannel **channelOut = nsnull)
{
nsresult rv;
nsCOMPtr<nsIChannel> channel;
@@ -208,8 +209,13 @@ NS_OpenURI(nsIInputStream **result,
if (NS_SUCCEEDED(rv)) {
nsIInputStream *stream;
rv = channel->Open(&stream);
if (NS_SUCCEEDED(rv))
if (NS_SUCCEEDED(rv)) {
*result = stream;
if (channelOut) {
*channelOut = nsnull;
channel.swap(*channelOut);
}
}
}
return rv;
}