Bug 642291 - crash [@ nsBufferedInputStream::Write] demos.mozilla.org motovational poster. ipc serialization does not work here, removing it. r=bent a=blocking-fennec
authorDoug Turner <dougt@dougt.org>
Thu, 17 Mar 2011 13:46:31 -0700
changeset 63435 b853c6efa929
parent 63434 e6ce7ec66a23
child 63436 f6215eef2276
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewersbent, blocking-fennec
bugs642291
milestone2.0b13pre
Bug 642291 - crash [@ nsBufferedInputStream::Write] demos.mozilla.org motovational poster. ipc serialization does not work here, removing it. r=bent a=blocking-fennec
content/base/src/nsDOMFile.cpp
--- a/content/base/src/nsDOMFile.cpp
+++ b/content/base/src/nsDOMFile.cpp
@@ -71,55 +71,48 @@
 using namespace mozilla;
 
 // XXXkhuey the input stream that we pass out of a DOMFile
 // can outlive the actual DOMFile object.  Thus, we must
 // ensure that the buffer underlying the stream we get
 // from NS_NewByteInputStream is held alive as long as the
 // stream is.  We do that by passing back this class instead.
 class DataOwnerAdapter : public nsIInputStream,
-                         public nsISeekableStream,
-                         public nsIIPCSerializable
+                         public nsISeekableStream
 {
   typedef nsDOMMemoryFile::DataOwner DataOwner;
 public:
   static nsresult Create(DataOwner* aDataOwner,
                          PRUint32 aStart,
                          PRUint32 aLength,
                          nsIInputStream** _retval);
 
   NS_DECL_ISUPPORTS
 
   NS_FORWARD_NSIINPUTSTREAM(mStream->)
 
   NS_FORWARD_NSISEEKABLESTREAM(mSeekableStream->)
 
-  NS_FORWARD_NSIIPCSERIALIZABLE(mSerializableStream->)
-
 private:
   DataOwnerAdapter(DataOwner* aDataOwner,
                    nsIInputStream* aStream)
     : mDataOwner(aDataOwner), mStream(aStream),
-      mSeekableStream(do_QueryInterface(aStream)),
-      mSerializableStream(do_QueryInterface(aStream))
+      mSeekableStream(do_QueryInterface(aStream))
   {
     NS_ASSERTION(mSeekableStream, "Somebody gave us the wrong stream!");
-    NS_ASSERTION(mSerializableStream, "Somebody gave us the wrong stream!");
   }
 
   nsRefPtr<DataOwner> mDataOwner;
   nsCOMPtr<nsIInputStream> mStream;
   nsCOMPtr<nsISeekableStream> mSeekableStream;
-  nsCOMPtr<nsIIPCSerializable> mSerializableStream;
 };
 
-NS_IMPL_THREADSAFE_ISUPPORTS3(DataOwnerAdapter,
+NS_IMPL_THREADSAFE_ISUPPORTS2(DataOwnerAdapter,
                               nsIInputStream,
-                              nsISeekableStream,
-                              nsIIPCSerializable)
+                              nsISeekableStream)
 
 nsresult DataOwnerAdapter::Create(DataOwner* aDataOwner,
                                   PRUint32 aStart,
                                   PRUint32 aLength,
                                   nsIInputStream** _retval)
 {
   nsresult rv;
   NS_ASSERTION(aDataOwner, "Uh ...");