Bug 793219 - Use bools in DOM Bluetooth code instead of nsresults; r=dhylands
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 21 Sep 2012 13:21:36 -0400
changeset 107686 1b82c517055dabe105512742ab5d5fec75a6a012
parent 107685 3c68fdd4f77acaaeffb4cd2905ce1477041ee171
child 107687 dbcc29e9fcf66cc5f5501826d6b69e73c8b1cab6
push id23503
push usereakhgari@mozilla.com
push dateFri, 21 Sep 2012 18:47:08 +0000
treeherdermozilla-central@d1b23fd87ba2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdhylands
bugs793219
milestone18.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 793219 - Use bools in DOM Bluetooth code instead of nsresults; r=dhylands
dom/bluetooth/ipc/BluetoothParent.cpp
--- a/dom/bluetooth/ipc/BluetoothParent.cpp
+++ b/dom/bluetooth/ipc/BluetoothParent.cpp
@@ -390,99 +390,99 @@ BluetoothRequestParent::DoRequest(const 
 }
 
 bool
 BluetoothRequestParent::DoRequest(const SetPinCodeRequest& aRequest)
 {
   MOZ_ASSERT(mService);
   MOZ_ASSERT(mRequestType == Request::TSetPinCodeRequest);
 
-  nsresult rv =
+  bool result =
     mService->SetPinCodeInternal(aRequest.path(),
                                  aRequest.pincode(),
                                  mReplyRunnable.get());
 
-  NS_ENSURE_SUCCESS(rv, false);
+  NS_ENSURE_TRUE(result, false);
 
   return true;
 }
 
 bool
 BluetoothRequestParent::DoRequest(const SetPasskeyRequest& aRequest)
 {
   MOZ_ASSERT(mService);
   MOZ_ASSERT(mRequestType == Request::TSetPasskeyRequest);
 
-  nsresult rv =
+  bool result =
     mService->SetPasskeyInternal(aRequest.path(),
                                  aRequest.passkey(),
                                  mReplyRunnable.get());
 
-  NS_ENSURE_SUCCESS(rv, false);
+  NS_ENSURE_TRUE(result, false);
 
   return true;
 }
 
 bool
 BluetoothRequestParent::DoRequest(const ConfirmPairingConfirmationRequest&
                                   aRequest)
 {
   MOZ_ASSERT(mService);
   MOZ_ASSERT(mRequestType == Request::TConfirmPairingConfirmationRequest);
 
-  nsresult rv =
+  bool result =
     mService->SetPairingConfirmationInternal(aRequest.path(),
                                              true,
                                              mReplyRunnable.get());
 
-  NS_ENSURE_SUCCESS(rv, false);
+  NS_ENSURE_TRUE(result, false);
 
   return true;
 }
 
 bool
 BluetoothRequestParent::DoRequest(const ConfirmAuthorizationRequest& aRequest)
 {
   MOZ_ASSERT(mService);
   MOZ_ASSERT(mRequestType == Request::TConfirmAuthorizationRequest);
 
-  nsresult rv =
+  bool result =
     mService->SetAuthorizationInternal(aRequest.path(),
                                        true,
                                        mReplyRunnable.get());
 
-  NS_ENSURE_SUCCESS(rv, false);
+  NS_ENSURE_TRUE(result, false);
 
   return true;
 }
 
 bool
 BluetoothRequestParent::DoRequest(const DenyPairingConfirmationRequest&
                                   aRequest)
 {
   MOZ_ASSERT(mService);
   MOZ_ASSERT(mRequestType == Request::TDenyPairingConfirmationRequest);
 
-  nsresult rv =
+  bool result =
     mService->SetPairingConfirmationInternal(aRequest.path(),
                                              false,
                                              mReplyRunnable.get());
 
-  NS_ENSURE_SUCCESS(rv, false);
+  NS_ENSURE_TRUE(result, false);
 
   return true;
 }
 
 bool
 BluetoothRequestParent::DoRequest(const DenyAuthorizationRequest& aRequest)
 {
   MOZ_ASSERT(mService);
   MOZ_ASSERT(mRequestType == Request::TDenyAuthorizationRequest);
 
-  nsresult rv =
+  bool result =
     mService->SetAuthorizationInternal(aRequest.path(),
                                        false,
                                        mReplyRunnable.get());
 
-  NS_ENSURE_SUCCESS(rv, false);
+  NS_ENSURE_TRUE(result, false);
 
   return true;
 }