зеркало из https://github.com/mozilla/gecko-dev.git
Bug 793219 - Use bools in DOM Bluetooth code instead of nsresults; r=dhylands
This commit is contained in:
Родитель
dc32cead74
Коммит
35b709f52d
|
@ -395,12 +395,12 @@ BluetoothRequestParent::DoRequest(const SetPinCodeRequest& aRequest)
|
||||||
MOZ_ASSERT(mService);
|
MOZ_ASSERT(mService);
|
||||||
MOZ_ASSERT(mRequestType == Request::TSetPinCodeRequest);
|
MOZ_ASSERT(mRequestType == Request::TSetPinCodeRequest);
|
||||||
|
|
||||||
nsresult rv =
|
bool result =
|
||||||
mService->SetPinCodeInternal(aRequest.path(),
|
mService->SetPinCodeInternal(aRequest.path(),
|
||||||
aRequest.pincode(),
|
aRequest.pincode(),
|
||||||
mReplyRunnable.get());
|
mReplyRunnable.get());
|
||||||
|
|
||||||
NS_ENSURE_SUCCESS(rv, false);
|
NS_ENSURE_TRUE(result, false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -411,12 +411,12 @@ BluetoothRequestParent::DoRequest(const SetPasskeyRequest& aRequest)
|
||||||
MOZ_ASSERT(mService);
|
MOZ_ASSERT(mService);
|
||||||
MOZ_ASSERT(mRequestType == Request::TSetPasskeyRequest);
|
MOZ_ASSERT(mRequestType == Request::TSetPasskeyRequest);
|
||||||
|
|
||||||
nsresult rv =
|
bool result =
|
||||||
mService->SetPasskeyInternal(aRequest.path(),
|
mService->SetPasskeyInternal(aRequest.path(),
|
||||||
aRequest.passkey(),
|
aRequest.passkey(),
|
||||||
mReplyRunnable.get());
|
mReplyRunnable.get());
|
||||||
|
|
||||||
NS_ENSURE_SUCCESS(rv, false);
|
NS_ENSURE_TRUE(result, false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -428,12 +428,12 @@ BluetoothRequestParent::DoRequest(const ConfirmPairingConfirmationRequest&
|
||||||
MOZ_ASSERT(mService);
|
MOZ_ASSERT(mService);
|
||||||
MOZ_ASSERT(mRequestType == Request::TConfirmPairingConfirmationRequest);
|
MOZ_ASSERT(mRequestType == Request::TConfirmPairingConfirmationRequest);
|
||||||
|
|
||||||
nsresult rv =
|
bool result =
|
||||||
mService->SetPairingConfirmationInternal(aRequest.path(),
|
mService->SetPairingConfirmationInternal(aRequest.path(),
|
||||||
true,
|
true,
|
||||||
mReplyRunnable.get());
|
mReplyRunnable.get());
|
||||||
|
|
||||||
NS_ENSURE_SUCCESS(rv, false);
|
NS_ENSURE_TRUE(result, false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -444,12 +444,12 @@ BluetoothRequestParent::DoRequest(const ConfirmAuthorizationRequest& aRequest)
|
||||||
MOZ_ASSERT(mService);
|
MOZ_ASSERT(mService);
|
||||||
MOZ_ASSERT(mRequestType == Request::TConfirmAuthorizationRequest);
|
MOZ_ASSERT(mRequestType == Request::TConfirmAuthorizationRequest);
|
||||||
|
|
||||||
nsresult rv =
|
bool result =
|
||||||
mService->SetAuthorizationInternal(aRequest.path(),
|
mService->SetAuthorizationInternal(aRequest.path(),
|
||||||
true,
|
true,
|
||||||
mReplyRunnable.get());
|
mReplyRunnable.get());
|
||||||
|
|
||||||
NS_ENSURE_SUCCESS(rv, false);
|
NS_ENSURE_TRUE(result, false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -461,12 +461,12 @@ BluetoothRequestParent::DoRequest(const DenyPairingConfirmationRequest&
|
||||||
MOZ_ASSERT(mService);
|
MOZ_ASSERT(mService);
|
||||||
MOZ_ASSERT(mRequestType == Request::TDenyPairingConfirmationRequest);
|
MOZ_ASSERT(mRequestType == Request::TDenyPairingConfirmationRequest);
|
||||||
|
|
||||||
nsresult rv =
|
bool result =
|
||||||
mService->SetPairingConfirmationInternal(aRequest.path(),
|
mService->SetPairingConfirmationInternal(aRequest.path(),
|
||||||
false,
|
false,
|
||||||
mReplyRunnable.get());
|
mReplyRunnable.get());
|
||||||
|
|
||||||
NS_ENSURE_SUCCESS(rv, false);
|
NS_ENSURE_TRUE(result, false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -477,12 +477,12 @@ BluetoothRequestParent::DoRequest(const DenyAuthorizationRequest& aRequest)
|
||||||
MOZ_ASSERT(mService);
|
MOZ_ASSERT(mService);
|
||||||
MOZ_ASSERT(mRequestType == Request::TDenyAuthorizationRequest);
|
MOZ_ASSERT(mRequestType == Request::TDenyAuthorizationRequest);
|
||||||
|
|
||||||
nsresult rv =
|
bool result =
|
||||||
mService->SetAuthorizationInternal(aRequest.path(),
|
mService->SetAuthorizationInternal(aRequest.path(),
|
||||||
false,
|
false,
|
||||||
mReplyRunnable.get());
|
mReplyRunnable.get());
|
||||||
|
|
||||||
NS_ENSURE_SUCCESS(rv, false);
|
NS_ENSURE_TRUE(result, false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче