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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user