Assert binder is not null when creating binder transport (#27527)

This commit is contained in:
Ming-Chuan 2021-10-01 11:05:39 +08:00 committed by GitHub
parent 34e4bd93e1
commit b16557b573
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -740,6 +740,8 @@ grpc_transport* grpc_create_binder_transport_client(
std::unique_ptr<grpc_binder::Binder> endpoint_binder) {
gpr_log(GPR_INFO, __func__);
GPR_ASSERT(endpoint_binder != nullptr);
grpc_binder_transport* t =
new grpc_binder_transport(std::move(endpoint_binder), /*is_client=*/true);
@ -750,6 +752,8 @@ grpc_transport* grpc_create_binder_transport_server(
std::unique_ptr<grpc_binder::Binder> client_binder) {
gpr_log(GPR_INFO, __func__);
GPR_ASSERT(client_binder != nullptr);
grpc_binder_transport* t =
new grpc_binder_transport(std::move(client_binder), /*is_client=*/false);