[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASSERT (#36527)

[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASSERT
Replacing GPR_ASSERT with absl CHECK.
These changes have been made using string replacement and regex.
Will not be replacing all instances of CHECK with CHECK_EQ , CHECK_NE etc because there are too many callsites. Only ones which are doable using very simple regex with least chance of failure will be replaced.
Given that we have 5000+ instances of GPR_ASSERT to edit, Doing it manually is too much work for both the author and reviewer.

Closes #36527

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36527 from tanvi-jagtap:tjagtap_core_lib_surface_call 9700707155
PiperOrigin-RevId: 631005739
pull/36536/head
Tanvi Jagtap 11 months ago committed by Copybara-Service
parent 7cc547dfd9
commit 09a29d3b32
  1. 7
      src/core/lib/surface/call.h

@ -24,6 +24,7 @@
#include "absl/functional/any_invocable.h"
#include "absl/functional/function_ref.h"
#include "absl/log/check.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
@ -162,8 +163,8 @@ class Call : public CppImplOf<Call, grpc_call>,
arena_(arena),
send_deadline_(send_deadline),
is_client_(is_client) {
GPR_DEBUG_ASSERT(arena_ != nullptr);
GPR_DEBUG_ASSERT(channel_ != nullptr);
DCHECK_NE(arena_, nullptr);
DCHECK(channel_ != nullptr);
}
~Call() override = default;
@ -172,7 +173,7 @@ class Call : public CppImplOf<Call, grpc_call>,
ParentCall* GetOrCreateParentCall();
ParentCall* parent_call();
Channel* channel() const {
GPR_DEBUG_ASSERT(channel_ != nullptr);
DCHECK(channel_ != nullptr);
return channel_.get();
}

Loading…
Cancel
Save