Bug 1307360 - Use MOZ_MUST_USE in netwerk/protocol/device r=valentin
authorWei-Cheng Pan <wpan@mozilla.com>
Mon, 03 Oct 2016 14:54:10 +0800
changeset 316600 4dc7f22c700fdbfd0328e64e20be6b65408bb098
parent 316599 dbc29ba0397ba999b09d9142a95d2f8d93664e24
child 316601 bbfb1c7bcc50f7b335d34c65fc54fb3af9584596
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
bugs1307360
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 1307360 - Use MOZ_MUST_USE in netwerk/protocol/device r=valentin MozReview-Commit-ID: Kc7a7GksoZl
netwerk/protocol/device/AndroidCaptureProvider.h
netwerk/protocol/device/CameraStreamImpl.h
netwerk/protocol/device/nsDeviceCaptureProvider.h
netwerk/protocol/device/nsDeviceChannel.h
netwerk/protocol/device/nsDeviceProtocolHandler.h
--- 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