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 107838 e607ca836919a1df8d90e7712b22987bd6d33a45
parent 107837 6b9539677b34601d93e34563eeae0b5edc068735
child 107839 5c5001289c3679c9c40ef8d64e5e0d9931dc9437
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersdhylands
bugs793219
milestone18.0a1
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;
 }