diff --git a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp index 05038c168f6..0a8053f87e0 100644 --- a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp +++ b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp @@ -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) { diff --git a/mozilla/modules/plugin/base/src/nsPluginInstancePeer.cpp b/mozilla/modules/plugin/base/src/nsPluginInstancePeer.cpp index 651ed469fbd..b435bd36301 100644 --- a/mozilla/modules/plugin/base/src/nsPluginInstancePeer.cpp +++ b/mozilla/modules/plugin/base/src/nsPluginInstancePeer.cpp @@ -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 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();