From 5a70261fd5207ed2f3f36daeeb88743a5ba452b0 Mon Sep 17 00:00:00 2001 From: "bnesse%netscape.com" Date: Fri, 20 Sep 2002 17:04:25 +0000 Subject: [PATCH] Fix for bug 157157. Always use nsInputStreamTee objects for streaming plugin data. r=beard git-svn-id: svn://10.0.0.236/branches/CHIMERA_M1_0_1_BRANCH@130155 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp index 22ee5b46ce3..3e10c30330a 100644 --- a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp +++ b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -2292,19 +2292,16 @@ NS_IMETHODIMP nsPluginStreamListenerPeer::OnDataAvailable(nsIRequest *request, mPluginStreamInfo->SetStreamOffset(absoluteOffset + amtForwardToPlugin); } - nsCOMPtr stream = aIStream; - // if we are caching the file ourselves to disk, we want to 'tee' off // the data as the plugin read from the stream. We do this by the magic // of an input stream tee. + nsCOMPtr stream; nsCOMPtr outStream; mPluginStreamInfo->GetLocalCachedFileStream(getter_AddRefs(outStream)); - if (outStream) { - rv = NS_NewInputStreamTee(getter_AddRefs(stream), aIStream, outStream); - if (NS_FAILED(rv)) - return rv; - } + rv = NS_NewInputStreamTee(getter_AddRefs(stream), aIStream, outStream); + if (NS_FAILED(rv)) + return rv; rv = mPStreamListener->OnDataAvailable((nsIPluginStreamInfo*)mPluginStreamInfo, stream,