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 347402 bbfb1c7bcc50f7b335d34c65fc54fb3af9584596
parent 347401 4dc7f22c700fdbfd0328e64e20be6b65408bb098
child 347403 cb48a92d0427b50fd18801f9a7f6607b46a7d38a
child 347512 8b74bede29c3ea65bbeb6561d34501b156e59662
push id10
push userfmarier@mozilla.com
push dateWed, 05 Oct 2016 23:37:28 +0000
reviewersvalentin
bugs1307364
milestone52.0a1
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__