From 5c8fa205952ff1b0eafec1b4e4c33e0efd480f4c Mon Sep 17 00:00:00 2001 From: "serge%netscape.com" Date: Tue, 30 Apr 2002 23:39:59 +0000 Subject: [PATCH] fix #139572 [Acrobat's form fails to render ( pdf on secure site)] r=peterl, sr=beard git-svn-id: svn://10.0.0.236/trunk@120356 18797224-902f-48f8-a5cc-f745e15eee43 --- .../modules/plugin/base/src/nsPluginHostImpl.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp index 195de6372ff..afdd329765f 100644 --- a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp +++ b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -5638,6 +5638,20 @@ NS_IMETHODIMP nsPluginHostImpl::NewPluginURLStream(const nsString& aURL, if (NS_SUCCEEDED(rv)) { + // it is possible one plugin instance can request several different + // streams, if we are serving those streams as files from + // temp location (e.g. browser cache is not available) + // we do not have to delete the files until instance is active, + // usually temp files are getting deleted when listener peer is released by OnStopRequest(), + // lets add this listener peer to the to list of stream peers for this instance, + // it'll delay the release until nsActivePlugin::setStopped() call. + nsActivePlugin * p = mActivePluginList.find(aInstance); + if (p && p->mStreams) + { + p->mStreams->AppendElement((void *)listenerPeer); + NS_ADDREF(listenerPeer); + } + nsCOMPtr callbacks; if (doc)