Bug 1307364 - Use MOZ_MUST_USE in netwerk/protocol/file r=valentin
authorWei-Cheng Pan <wpan@mozilla.com>
Mon, 03 Oct 2016 14:54:40 +0800
changeset 316601 bbfb1c7bcc50f7b335d34c65fc54fb3af9584596
parent 316600 4dc7f22c700fdbfd0328e64e20be6b65408bb098
child 316603 cb48a92d0427b50fd18801f9a7f6607b46a7d38a
child 316672 8b74bede29c3ea65bbeb6561d34501b156e59662
push id82480
push usercbook@mozilla.com
push dateWed, 05 Oct 2016 15:07:31 +0000
treeherdermozilla-inbound@c52dec387187 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin
bugs1307364
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1307364 - Use MOZ_MUST_USE in netwerk/protocol/file r=valentin MozReview-Commit-ID: 4EaTsMOpy0n
netwerk/protocol/file/nsFileChannel.h
netwerk/protocol/file/nsFileProtocolHandler.h
--- a/netwerk/protocol/file/nsFileChannel.h
+++ b/netwerk/protocol/file/nsFileChannel.h
@@ -24,20 +24,22 @@ public:
 
 protected:
   ~nsFileChannel();
 
   // Called to construct a blocking file input stream for the given file.  This
   // method also returns a best guess at the content-type for the data stream.
   // NOTE: If the channel has a type hint set, contentType will be left
   // untouched. The caller should not use it in that case.
-  nsresult MakeFileInputStream(nsIFile *file, nsCOMPtr<nsIInputStream> &stream,
-                               nsCString &contentType, bool async);
+  MOZ_MUST_USE nsresult MakeFileInputStream(nsIFile *file,
+                                            nsCOMPtr<nsIInputStream> &stream,
+                                            nsCString &contentType, bool async);
 
-  virtual nsresult OpenContentStream(bool async, nsIInputStream **result,
-                                     nsIChannel** channel) override;
+  virtual MOZ_MUST_USE nsresult OpenContentStream(bool async,
+                                                  nsIInputStream **result,
+                                                  nsIChannel** channel) override;
 
 private:
   nsCOMPtr<nsIInputStream> mUploadStream;
   int64_t mUploadLength;
 };
 
 #endif // !nsFileChannel_h__
--- a/netwerk/protocol/file/nsFileProtocolHandler.h
+++ b/netwerk/protocol/file/nsFileProtocolHandler.h
@@ -16,12 +16,12 @@ class nsFileProtocolHandler : public nsI
 
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIPROTOCOLHANDLER
     NS_DECL_NSIFILEPROTOCOLHANDLER
 
     nsFileProtocolHandler();
 
-    nsresult Init();
+    MOZ_MUST_USE nsresult Init();
 };
 
 #endif // !nsFileProtocolHandler_h__