Bug 1500201 - Port Bug 1496581: nsISeekableStream is split into nsISeekableStream and nsITellableStream now. rs=bustage-fix
authorJorg K <jorgk@jorgk.com>
Thu, 18 Oct 2018 20:47:29 +0200
changeset 33405 c818d0a484d571351c9e21fb67a06bff37d4cb85
parent 33404 4e6b66d1a7e326d1764ef1f5b2d061e910a3c917
child 33406 0a30492067741f0f6f458f165b570b0be4b72001
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersbustage-fix
bugs1500201, 1496581
Bug 1500201 - Port Bug 1496581: nsISeekableStream is split into nsISeekableStream and nsITellableStream now. rs=bustage-fix
mailnews/base/util/nsMsgFileStream.cpp
mailnews/base/util/nsMsgFileStream.h
--- a/mailnews/base/util/nsMsgFileStream.cpp
+++ b/mailnews/base/util/nsMsgFileStream.cpp
@@ -38,17 +38,17 @@ nsMsgFileStream::nsMsgFileStream()
 }
 
 nsMsgFileStream::~nsMsgFileStream()
 {
   if (mFileDesc)
     PR_Close(mFileDesc);
 }
 
-NS_IMPL_ISUPPORTS(nsMsgFileStream, nsIInputStream, nsIOutputStream, nsISeekableStream)
+NS_IMPL_ISUPPORTS(nsMsgFileStream, nsIInputStream, nsIOutputStream, nsITellableStream, nsISeekableStream)
 
 nsresult nsMsgFileStream::InitWithFile(nsIFile *file)
 {
   return file->OpenNSPRFileDesc(PR_RDWR|PR_CREATE_FILE, 0664, &mFileDesc);
 }
 
 NS_IMETHODIMP
 nsMsgFileStream::Seek(int32_t whence, int64_t offset)
--- a/mailnews/base/util/nsMsgFileStream.h
+++ b/mailnews/base/util/nsMsgFileStream.h
@@ -5,29 +5,30 @@
 #include "mozilla/Attributes.h"
 #include "msgCore.h"
 #include "nsIInputStream.h"
 #include "nsIOutputStream.h"
 #include "nsISeekableStream.h"
 #include "prio.h"
 
 class nsMsgFileStream final : public nsIInputStream,
-                                  public nsIOutputStream,
-                                  public nsISeekableStream
+                              public nsIOutputStream,
+                              public nsISeekableStream
 {
 public:
   nsMsgFileStream();
 
   NS_DECL_ISUPPORTS
 
   NS_IMETHOD Available(uint64_t *_retval) override;
   NS_IMETHOD Read(char * aBuf, uint32_t aCount, uint32_t *_retval) override;
   NS_IMETHOD ReadSegments(nsWriteSegmentFun aWriter, void * aClosure, uint32_t aCount, uint32_t *_retval) override;
   NS_DECL_NSIOUTPUTSTREAM
   NS_DECL_NSISEEKABLESTREAM
+  NS_DECL_NSITELLABLESTREAM
 
   nsresult InitWithFile(nsIFile *localFile);
 protected:
   ~nsMsgFileStream();
 
   PRFileDesc *mFileDesc;
   bool mSeekedToEnd;
 };