diff options
author | 2017-03-27 15:47:58 -0700 | |
---|---|---|
committer | 2017-03-27 15:47:58 -0700 | |
commit | 978c34f6eae3a66ee91113928d9d057aefcc009d (patch) | |
tree | 069b7b00ae6314548187f5e52a70c7d07ebf3e7a /src/core/lib/iomgr/closure.c | |
parent | e5ddd4b906b99781709b5f77b9c2b277df9d51c4 (diff) | |
parent | 6f1e443a519cd28d97be78c5ca2ca72a45f6b598 (diff) |
Merge branch 'master' into stream_corked_pr
Diffstat (limited to 'src/core/lib/iomgr/closure.c')
-rw-r--r-- | src/core/lib/iomgr/closure.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/closure.c b/src/core/lib/iomgr/closure.c index 509c1ff95d..6633fb68ec 100644 --- a/src/core/lib/iomgr/closure.c +++ b/src/core/lib/iomgr/closure.c @@ -33,6 +33,7 @@ #include "src/core/lib/iomgr/closure.h" +#include <assert.h> #include <grpc/support/alloc.h> #include <grpc/support/log.h> @@ -124,6 +125,7 @@ void grpc_closure_run(grpc_exec_ctx *exec_ctx, grpc_closure *c, grpc_error *error) { GPR_TIMER_BEGIN("grpc_closure_run", 0); if (c != NULL) { + assert(c->cb); c->scheduler->vtable->run(exec_ctx, c, error); } else { GRPC_ERROR_UNREF(error); @@ -135,6 +137,7 @@ void grpc_closure_sched(grpc_exec_ctx *exec_ctx, grpc_closure *c, grpc_error *error) { GPR_TIMER_BEGIN("grpc_closure_sched", 0); if (c != NULL) { + assert(c->cb); c->scheduler->vtable->sched(exec_ctx, c, error); } else { GRPC_ERROR_UNREF(error); @@ -146,6 +149,7 @@ void grpc_closure_list_sched(grpc_exec_ctx *exec_ctx, grpc_closure_list *list) { grpc_closure *c = list->head; while (c != NULL) { grpc_closure *next = c->next_data.next; + assert(c->cb); c->scheduler->vtable->sched(exec_ctx, c, c->error_data.error); c = next; } |