Bug 1307360 - Use MOZ_MUST_USE in netwerk/protocol/device r?valentin
MozReview-Commit-ID: Kc7a7GksoZl
--- a/netwerk/protocol/device/AndroidCaptureProvider.h
+++ b/netwerk/protocol/device/AndroidCaptureProvider.h
@@ -20,17 +20,17 @@ class AndroidCaptureProvider final : pub
private:
~AndroidCaptureProvider();
public:
AndroidCaptureProvider();
NS_DECL_THREADSAFE_ISUPPORTS
- nsresult Init(nsACString& aContentType, nsCaptureParams* aParams, nsIInputStream** aStream) override;
+ MOZ_MUST_USE nsresult Init(nsACString& aContentType, nsCaptureParams* aParams, nsIInputStream** aStream) override;
static AndroidCaptureProvider* sInstance;
};
class AndroidCameraInputStream final : public nsIAsyncInputStream, mozilla::net::CameraStreamImpl::FrameCallback {
private:
~AndroidCameraInputStream();
public:
--- a/netwerk/protocol/device/CameraStreamImpl.h
+++ b/netwerk/protocol/device/CameraStreamImpl.h
@@ -32,17 +32,17 @@ public:
bool initNeeded() {
return !mInit;
}
FrameCallback* GetFrameCallback() {
return mCallback;
}
- bool Init(const nsCString& contentType, const uint32_t& camera, const uint32_t& width, const uint32_t& height, FrameCallback* callback);
+ MOZ_MUST_USE bool Init(const nsCString& contentType, const uint32_t& camera, const uint32_t& width, const uint32_t& height, FrameCallback* callback);
void Close();
uint32_t GetWidth() { return mWidth; }
uint32_t GetHeight() { return mHeight; }
uint32_t GetFps() { return mFps; }
void takePicture(const nsAString& aFileName);
--- a/netwerk/protocol/device/nsDeviceCaptureProvider.h
+++ b/netwerk/protocol/device/nsDeviceCaptureProvider.h
@@ -18,14 +18,14 @@ struct nsCaptureParams {
uint32_t height;
uint32_t bpp;
uint32_t camera;
};
class nsDeviceCaptureProvider : public nsISupports
{
public:
- virtual nsresult Init(nsACString& aContentType,
- nsCaptureParams* aParams,
- nsIInputStream** aStream) = 0;
+ virtual MOZ_MUST_USE nsresult Init(nsACString& aContentType,
+ nsCaptureParams* aParams,
+ nsIInputStream** aStream) = 0;
};
#endif
--- a/netwerk/protocol/device/nsDeviceChannel.h
+++ b/netwerk/protocol/device/nsDeviceChannel.h
@@ -10,17 +10,17 @@
class nsDeviceChannel : public nsBaseChannel
{
public:
NS_DECL_ISUPPORTS_INHERITED
nsDeviceChannel();
- nsresult Init(nsIURI* uri);
- nsresult OpenContentStream(bool aAsync,
- nsIInputStream **aStream,
- nsIChannel **aChannel) override;
+ MOZ_MUST_USE nsresult Init(nsIURI* uri);
+ MOZ_MUST_USE nsresult OpenContentStream(bool aAsync,
+ nsIInputStream **aStream,
+ nsIChannel **aChannel) override;
protected:
~nsDeviceChannel();
};
#endif
--- a/netwerk/protocol/device/nsDeviceProtocolHandler.h
+++ b/netwerk/protocol/device/nsDeviceProtocolHandler.h
@@ -21,14 +21,14 @@ class nsDeviceProtocolHandler final : pu
~nsDeviceProtocolHandler() {}
public:
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIPROTOCOLHANDLER
nsDeviceProtocolHandler() {}
- nsresult Init();
+ MOZ_MUST_USE nsresult Init();
};
} // namespace net
} // namespace mozilla
#endif