Merge pull request #15205 from yashykt/gprassert

Replace assert in closures with GPR_ASSERT
reviewable/pr15240/r1
Yash Tibrewal 7 years ago committed by GitHub
commit bdc523af68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/core/lib/iomgr/closure.h

@ -253,8 +253,8 @@ inline void grpc_closure_run(grpc_closure* c, grpc_error* error) {
c->file_initiated = file; c->file_initiated = file;
c->line_initiated = line; c->line_initiated = line;
c->run = true; c->run = true;
GPR_ASSERT(c->cb != nullptr);
#endif #endif
assert(c->cb);
c->scheduler->vtable->run(c, error); c->scheduler->vtable->run(c, error);
} else { } else {
GRPC_ERROR_UNREF(error); GRPC_ERROR_UNREF(error);
@ -292,8 +292,8 @@ inline void grpc_closure_sched(grpc_closure* c, grpc_error* error) {
c->file_initiated = file; c->file_initiated = file;
c->line_initiated = line; c->line_initiated = line;
c->run = false; c->run = false;
GPR_ASSERT(c->cb != nullptr);
#endif #endif
assert(c->cb);
c->scheduler->vtable->sched(c, error); c->scheduler->vtable->sched(c, error);
} else { } else {
GRPC_ERROR_UNREF(error); GRPC_ERROR_UNREF(error);
@ -330,8 +330,8 @@ inline void grpc_closure_list_sched(grpc_closure_list* list) {
c->file_initiated = file; c->file_initiated = file;
c->line_initiated = line; c->line_initiated = line;
c->run = false; c->run = false;
GPR_ASSERT(c->cb != nullptr);
#endif #endif
assert(c->cb);
c->scheduler->vtable->sched(c, c->error_data.error); c->scheduler->vtable->sched(c, c->error_data.error);
c = next; c = next;
} }

Loading…
Cancel
Save