Bug 17732 -- plugin invoked streams to the browser do not work, r=peterl, sr=rpotts
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@111252 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -723,8 +723,11 @@ _posturl(NPP npp,
|
||||
// A little helper class used to wrap up plugin manager streams (that is,
|
||||
// streams from the plugin to the browser).
|
||||
|
||||
class ns4xStreamWrapper
|
||||
class ns4xStreamWrapper : public nsISupports
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
protected:
|
||||
nsIOutputStream *fStream;
|
||||
NPStream fNPStream;
|
||||
@@ -741,6 +744,8 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS1(ns4xStreamWrapper, nsISupports);
|
||||
|
||||
ns4xStreamWrapper::ns4xStreamWrapper(nsIOutputStream* stream)
|
||||
: fStream(stream)
|
||||
{
|
||||
|
||||
@@ -207,7 +207,7 @@ nsPluginStreamToFile::nsPluginStreamToFile(const char* target, nsIPluginInstance
|
||||
tpath[0] = 0;
|
||||
#endif // XP_PC
|
||||
|
||||
PR_snprintf(buf, sizeof(buf), "%s%08X.html", tpath, this);
|
||||
PR_snprintf(buf, sizeof(buf), "%s%08X", tpath, this);
|
||||
|
||||
|
||||
// Create and validate the file spec object. (When we have a constructor for the temp
|
||||
@@ -270,7 +270,7 @@ nsPluginStreamToFile::Write(const char* aBuf, PRUint32 aCount, PRUint32 *aWriteC
|
||||
// write the data to the file and update the target
|
||||
nsCOMPtr<nsIOpenFile> thing;
|
||||
thing = do_QueryInterface(mFileThing);
|
||||
thing->Open(mFileSpec, (PR_RDWR|PR_APPEND), 0700);
|
||||
thing->Open(mFileSpec, (PR_WRONLY | PR_CREATE_FILE | PR_APPEND), 0700);
|
||||
PRUint32 actualCount;
|
||||
mFileThing->Write(aBuf, aCount, &actualCount);
|
||||
mFileThing->Close();
|
||||
|
||||
Reference in New Issue
Block a user