Skip to content

Commit

Permalink
[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_AS…
Browse files Browse the repository at this point in the history
…SERT (grpc#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 grpc#36527

COPYBARA_INTEGRATE_REVIEW=grpc#36527 from tanvi-jagtap:tjagtap_core_lib_surface_call 9700707
PiperOrigin-RevId: 631005739
  • Loading branch information
tanvi-jagtap authored and copybara-github committed May 6, 2024
1 parent 7cc547d commit 09a29d3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/lib/surface/call.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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;

Expand All @@ -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();
}

Expand Down

0 comments on commit 09a29d3

Please sign in to comment.