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 107720 e607ca836919a1df8d90e7712b22987bd6d33a45
parent 107719 6b9539677b34601d93e34563eeae0b5edc068735
child 107721 5c5001289c3679c9c40ef8d64e5e0d9931dc9437
push id15186
push usereakhgari@mozilla.com
push dateFri, 21 Sep 2012 17:36:32 +0000
treeherdermozilla-inbound@e607ca836919 [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;
 }