Bug 1307364 - Use MOZ_MUST_USE in netwerk/protocol/file r?valentin
MozReview-Commit-ID: 4EaTsMOpy0n
--- 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__