From e76b97d27e891d680f89cf9b1853d38ba953c40d Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 12 Aug 2020 09:17:53 -0700 Subject: [PATCH] Update CallRegistrationTable comment --- src/core/lib/surface/channel.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/lib/surface/channel.h b/src/core/lib/surface/channel.h index 2c8ea4f40d1..2cca3a73003 100644 --- a/src/core/lib/surface/channel.h +++ b/src/core/lib/surface/channel.h @@ -90,6 +90,9 @@ struct RegisteredCall { struct CallRegistrationTable { grpc_core::Mutex mu; + // The map key should be owned strings rather than unowned char*'s to + // guarantee that it outlives calls on the core channel (which may outlast the + // C++ or other wrapped language Channel that registered these calls). std::map, RegisteredCall> map /* GUARDED_BY(mu) */; int method_registration_attempts /* GUARDED_BY(mu) */ = 0;