grpc 1.25.0 → 1.26.0.pre1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grpc might be problematic. Click here for more details.

Files changed (278) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +782 -291
  3. data/include/grpc/impl/codegen/grpc_types.h +4 -0
  4. data/include/grpc/impl/codegen/port_platform.h +7 -0
  5. data/include/grpc/support/alloc.h +0 -16
  6. data/src/core/ext/filters/client_channel/backend_metric.cc +2 -2
  7. data/src/core/ext/filters/client_channel/backup_poller.cc +1 -1
  8. data/src/core/ext/filters/client_channel/channel_connectivity.cc +2 -2
  9. data/src/core/ext/filters/client_channel/client_channel.cc +95 -88
  10. data/src/core/ext/filters/client_channel/client_channel_channelz.cc +7 -7
  11. data/src/core/ext/filters/client_channel/client_channel_channelz.h +4 -2
  12. data/src/core/ext/filters/client_channel/client_channel_factory.cc +1 -1
  13. data/src/core/ext/filters/client_channel/client_channel_plugin.cc +3 -3
  14. data/src/core/ext/filters/client_channel/connector.h +40 -45
  15. data/src/core/ext/filters/client_channel/global_subchannel_pool.cc +10 -10
  16. data/src/core/ext/filters/client_channel/health/health_check_client.cc +16 -13
  17. data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +66 -37
  18. data/src/core/ext/filters/client_channel/http_proxy.cc +107 -116
  19. data/src/core/ext/filters/client_channel/http_proxy.h +5 -1
  20. data/src/core/ext/filters/client_channel/lb_policy.cc +3 -3
  21. data/src/core/ext/filters/client_channel/lb_policy.h +9 -5
  22. data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +10 -8
  23. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +18 -19
  24. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +4 -3
  25. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +4 -4
  26. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +1 -1
  27. data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +3 -3
  28. data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +3 -3
  29. data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +6 -9
  30. data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +368 -0
  31. data/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +157 -77
  32. data/src/core/ext/filters/client_channel/lb_policy_registry.cc +5 -5
  33. data/src/core/ext/filters/client_channel/lb_policy_registry.h +1 -1
  34. data/src/core/ext/filters/client_channel/local_subchannel_pool.cc +8 -8
  35. data/src/core/ext/filters/client_channel/proxy_mapper.h +14 -34
  36. data/src/core/ext/filters/client_channel/proxy_mapper_registry.cc +46 -79
  37. data/src/core/ext/filters/client_channel/proxy_mapper_registry.h +23 -17
  38. data/src/core/ext/filters/client_channel/resolver.cc +2 -1
  39. data/src/core/ext/filters/client_channel/resolver.h +2 -2
  40. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +1 -1
  41. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc +4 -4
  42. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +1 -1
  43. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +13 -10
  44. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +3 -2
  45. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +9 -8
  46. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +17 -16
  47. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +2 -2
  48. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc +4 -4
  49. data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +9 -9
  50. data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +5 -3
  51. data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +1 -1
  52. data/src/core/ext/filters/client_channel/resolver_factory.h +3 -3
  53. data/src/core/ext/filters/client_channel/resolver_registry.cc +14 -12
  54. data/src/core/ext/filters/client_channel/resolver_registry.h +6 -4
  55. data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +6 -6
  56. data/src/core/ext/filters/client_channel/resolver_result_parsing.h +6 -6
  57. data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +5 -5
  58. data/src/core/ext/filters/client_channel/resolving_lb_policy.h +3 -3
  59. data/src/core/ext/filters/client_channel/service_config.cc +15 -14
  60. data/src/core/ext/filters/client_channel/service_config.h +14 -19
  61. data/src/core/ext/filters/client_channel/subchannel.cc +38 -36
  62. data/src/core/ext/filters/client_channel/subchannel.h +11 -12
  63. data/src/core/ext/filters/client_channel/subchannel_interface.h +1 -1
  64. data/src/core/ext/filters/client_channel/xds/xds_api.cc +19 -9
  65. data/src/core/ext/filters/client_channel/xds/xds_api.h +19 -9
  66. data/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc +3 -3
  67. data/src/core/ext/filters/client_channel/xds/xds_bootstrap.h +6 -5
  68. data/src/core/ext/filters/client_channel/xds/xds_client.cc +58 -31
  69. data/src/core/ext/filters/client_channel/xds/xds_client.h +20 -15
  70. data/src/core/ext/filters/client_channel/xds/xds_client_stats.cc +5 -3
  71. data/src/core/ext/filters/client_channel/xds/xds_client_stats.h +18 -15
  72. data/src/core/ext/filters/client_idle/client_idle_filter.cc +10 -10
  73. data/src/core/ext/filters/deadline/deadline_filter.cc +15 -13
  74. data/src/core/ext/filters/http/client/http_client_filter.cc +12 -12
  75. data/src/core/ext/filters/http/client_authority_filter.cc +3 -3
  76. data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +13 -7
  77. data/src/core/ext/filters/http/server/http_server_filter.cc +14 -13
  78. data/src/core/ext/filters/max_age/max_age_filter.cc +16 -14
  79. data/src/core/ext/filters/message_size/message_size_filter.cc +10 -8
  80. data/src/core/ext/filters/message_size/message_size_filter.h +1 -1
  81. data/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc +9 -8
  82. data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +141 -174
  83. data/src/core/ext/transport/chttp2/client/chttp2_connector.h +31 -1
  84. data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +7 -6
  85. data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +14 -12
  86. data/src/core/ext/transport/chttp2/server/chttp2_server.cc +8 -5
  87. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +46 -38
  88. data/src/core/ext/transport/chttp2/transport/context_list.cc +2 -2
  89. data/src/core/ext/transport/chttp2/transport/flow_control.h +0 -5
  90. data/src/core/ext/transport/chttp2/transport/frame_data.cc +6 -7
  91. data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +2 -2
  92. data/src/core/ext/transport/chttp2/transport/frame_ping.cc +1 -1
  93. data/src/core/ext/transport/chttp2/transport/frame_settings.cc +4 -3
  94. data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +5 -5
  95. data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +11 -8
  96. data/src/core/ext/transport/chttp2/transport/internal.h +3 -3
  97. data/src/core/ext/transport/chttp2/transport/parsing.cc +4 -4
  98. data/src/core/ext/transport/chttp2/transport/writing.cc +3 -2
  99. data/src/core/ext/transport/inproc/inproc_transport.cc +65 -41
  100. data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +0 -1
  101. data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c +141 -70
  102. data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +352 -118
  103. data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +0 -1
  104. data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c +0 -1
  105. data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +8 -4
  106. data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +65 -0
  107. data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +0 -1
  108. data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +16 -2
  109. data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +36 -0
  110. data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +12 -5
  111. data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +34 -0
  112. data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +1 -2
  113. data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +13 -12
  114. data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +28 -24
  115. data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +0 -1
  116. data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +5 -4
  117. data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +13 -0
  118. data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +0 -1
  119. data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c +23 -23
  120. data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +48 -44
  121. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +0 -1
  122. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +0 -1
  123. data/src/core/ext/upb-generated/envoy/type/http.upb.c +16 -0
  124. data/src/core/ext/upb-generated/envoy/type/http.upb.h +36 -0
  125. data/src/core/ext/upb-generated/envoy/type/percent.upb.c +0 -1
  126. data/src/core/ext/upb-generated/envoy/type/range.upb.c +0 -1
  127. data/src/core/lib/avl/avl.cc +1 -1
  128. data/src/core/lib/channel/channel_stack.cc +1 -1
  129. data/src/core/lib/channel/channel_stack.h +16 -4
  130. data/src/core/lib/channel/channel_trace.cc +4 -4
  131. data/src/core/lib/channel/channelz.cc +46 -46
  132. data/src/core/lib/channel/channelz.h +37 -35
  133. data/src/core/lib/channel/channelz_registry.cc +2 -2
  134. data/src/core/lib/channel/channelz_registry.h +1 -1
  135. data/src/core/lib/channel/connected_channel.cc +3 -2
  136. data/src/core/lib/channel/handshaker.cc +1 -1
  137. data/src/core/lib/channel/handshaker_registry.cc +5 -5
  138. data/src/core/lib/channel/handshaker_registry.h +3 -3
  139. data/src/core/lib/compression/message_compress.cc +3 -2
  140. data/src/core/lib/compression/stream_compression_identity.cc +5 -7
  141. data/src/core/lib/gpr/alloc.cc +4 -29
  142. data/src/core/lib/gpr/cpu_linux.cc +1 -1
  143. data/src/core/lib/gprpp/fork.cc +4 -4
  144. data/src/core/lib/gprpp/global_config_env.cc +7 -7
  145. data/src/core/lib/gprpp/global_config_env.h +2 -2
  146. data/src/core/lib/gprpp/host_port.cc +8 -8
  147. data/src/core/lib/gprpp/host_port.h +3 -3
  148. data/src/core/lib/gprpp/inlined_vector.h +13 -0
  149. data/src/core/lib/gprpp/map.h +2 -9
  150. data/src/core/lib/gprpp/memory.h +12 -98
  151. data/src/core/lib/gprpp/orphanable.h +3 -3
  152. data/src/core/lib/gprpp/ref_counted.h +3 -3
  153. data/src/core/lib/gprpp/ref_counted_ptr.h +1 -1
  154. data/src/core/lib/gprpp/string_view.h +45 -23
  155. data/src/core/lib/gprpp/thd.h +1 -1
  156. data/src/core/lib/gprpp/thd_posix.cc +6 -5
  157. data/src/core/lib/gprpp/thd_windows.cc +3 -3
  158. data/src/core/lib/http/httpcli.cc +1 -1
  159. data/src/core/lib/http/httpcli_security_connector.cc +3 -3
  160. data/src/core/lib/iomgr/buffer_list.cc +10 -5
  161. data/src/core/lib/iomgr/call_combiner.cc +7 -6
  162. data/src/core/lib/iomgr/call_combiner.h +4 -3
  163. data/src/core/lib/iomgr/cfstream_handle.cc +2 -2
  164. data/src/core/lib/iomgr/closure.h +33 -135
  165. data/src/core/lib/iomgr/combiner.cc +10 -17
  166. data/src/core/lib/iomgr/combiner.h +0 -2
  167. data/src/core/lib/iomgr/endpoint_cfstream.cc +2 -2
  168. data/src/core/lib/iomgr/endpoint_pair_posix.cc +1 -1
  169. data/src/core/lib/iomgr/ev_epoll1_linux.cc +3 -2
  170. data/src/core/lib/iomgr/ev_epollex_linux.cc +23 -13
  171. data/src/core/lib/iomgr/ev_poll_posix.cc +30 -17
  172. data/src/core/lib/iomgr/exec_ctx.cc +52 -5
  173. data/src/core/lib/iomgr/exec_ctx.h +6 -2
  174. data/src/core/lib/iomgr/executor.cc +16 -37
  175. data/src/core/lib/iomgr/executor.h +4 -7
  176. data/src/core/lib/iomgr/executor/threadpool.cc +4 -4
  177. data/src/core/lib/iomgr/iomgr_custom.cc +1 -1
  178. data/src/core/lib/iomgr/lockfree_event.cc +9 -8
  179. data/src/core/lib/iomgr/logical_thread.cc +103 -0
  180. data/src/core/lib/iomgr/logical_thread.h +52 -0
  181. data/src/core/lib/iomgr/pollset_custom.cc +5 -5
  182. data/src/core/lib/iomgr/pollset_set_custom.cc +9 -9
  183. data/src/core/lib/iomgr/pollset_windows.cc +16 -2
  184. data/src/core/lib/iomgr/port.h +3 -0
  185. data/src/core/lib/iomgr/resolve_address_custom.cc +4 -4
  186. data/src/core/lib/iomgr/resolve_address_posix.cc +8 -9
  187. data/src/core/lib/iomgr/resolve_address_windows.cc +4 -6
  188. data/src/core/lib/iomgr/resource_quota.cc +26 -21
  189. data/src/core/lib/iomgr/socket_utils_common_posix.cc +11 -0
  190. data/src/core/lib/iomgr/socket_windows.cc +2 -2
  191. data/src/core/lib/iomgr/tcp_client_cfstream.cc +2 -2
  192. data/src/core/lib/iomgr/tcp_client_custom.cc +2 -2
  193. data/src/core/lib/iomgr/tcp_client_posix.cc +5 -4
  194. data/src/core/lib/iomgr/tcp_client_windows.cc +2 -2
  195. data/src/core/lib/iomgr/tcp_custom.cc +10 -9
  196. data/src/core/lib/iomgr/tcp_posix.cc +19 -15
  197. data/src/core/lib/iomgr/tcp_server_custom.cc +3 -2
  198. data/src/core/lib/iomgr/tcp_server_posix.cc +5 -4
  199. data/src/core/lib/iomgr/tcp_server_windows.cc +5 -3
  200. data/src/core/lib/iomgr/tcp_windows.cc +16 -13
  201. data/src/core/lib/iomgr/timer_custom.cc +4 -3
  202. data/src/core/lib/iomgr/timer_generic.cc +11 -9
  203. data/src/core/lib/iomgr/udp_server.cc +16 -13
  204. data/src/core/lib/security/credentials/alts/alts_credentials.cc +8 -5
  205. data/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +45 -57
  206. data/src/core/lib/security/credentials/composite/composite_credentials.cc +7 -6
  207. data/src/core/lib/security/credentials/credentials.cc +8 -8
  208. data/src/core/lib/security/credentials/credentials.h +5 -5
  209. data/src/core/lib/security/credentials/fake/fake_credentials.cc +5 -5
  210. data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +1 -1
  211. data/src/core/lib/security/credentials/iam/iam_credentials.cc +4 -4
  212. data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +4 -4
  213. data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +2 -2
  214. data/src/core/lib/security/credentials/local/local_credentials.cc +3 -3
  215. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +13 -11
  216. data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +6 -5
  217. data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +4 -4
  218. data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +5 -5
  219. data/src/core/lib/security/credentials/tls/spiffe_credentials.cc +2 -2
  220. data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +28 -22
  221. data/src/core/lib/security/security_connector/alts/alts_security_connector.h +5 -0
  222. data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +10 -10
  223. data/src/core/lib/security/security_connector/load_system_roots_linux.cc +2 -1
  224. data/src/core/lib/security/security_connector/local/local_security_connector.cc +8 -8
  225. data/src/core/lib/security/security_connector/security_connector.h +1 -1
  226. data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +9 -9
  227. data/src/core/lib/security/security_connector/ssl_utils.cc +5 -4
  228. data/src/core/lib/security/security_connector/tls/spiffe_security_connector.cc +14 -15
  229. data/src/core/lib/security/transport/client_auth_filter.cc +4 -3
  230. data/src/core/lib/security/transport/secure_endpoint.cc +9 -8
  231. data/src/core/lib/security/transport/security_handshaker.cc +67 -23
  232. data/src/core/lib/security/transport/server_auth_filter.cc +6 -5
  233. data/src/core/lib/security/transport/target_authority_table.h +1 -1
  234. data/src/core/lib/slice/b64.cc +3 -4
  235. data/src/core/lib/slice/b64.h +1 -2
  236. data/src/core/lib/slice/slice.cc +8 -13
  237. data/src/core/lib/surface/call.cc +19 -19
  238. data/src/core/lib/surface/call.h +6 -7
  239. data/src/core/lib/surface/call_log_batch.cc +1 -2
  240. data/src/core/lib/surface/channel.cc +17 -18
  241. data/src/core/lib/surface/channel.h +4 -19
  242. data/src/core/lib/surface/channel_ping.cc +1 -1
  243. data/src/core/lib/surface/completion_queue.cc +21 -22
  244. data/src/core/lib/surface/completion_queue_factory.cc +1 -1
  245. data/src/core/lib/surface/init.cc +1 -1
  246. data/src/core/lib/surface/init_secure.cc +2 -2
  247. data/src/core/lib/surface/lame_client.cc +10 -12
  248. data/src/core/lib/surface/server.cc +24 -18
  249. data/src/core/lib/surface/version.cc +2 -2
  250. data/src/core/lib/transport/byte_stream.cc +2 -2
  251. data/src/core/lib/transport/byte_stream.h +2 -1
  252. data/src/core/lib/transport/connectivity_state.cc +4 -4
  253. data/src/core/lib/transport/connectivity_state.h +2 -2
  254. data/src/core/lib/transport/metadata.cc +8 -10
  255. data/src/core/lib/transport/metadata.h +5 -8
  256. data/src/core/lib/transport/metadata_batch.cc +6 -0
  257. data/src/core/lib/transport/static_metadata.cc +2 -4
  258. data/src/core/lib/transport/status_metadata.cc +7 -0
  259. data/src/core/lib/transport/status_metadata.h +18 -0
  260. data/src/core/lib/transport/transport.cc +9 -7
  261. data/src/core/plugin_registry/grpc_plugin_registry.cc +4 -0
  262. data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +292 -43
  263. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +197 -46
  264. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +4 -2
  265. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h +5 -0
  266. data/src/core/tsi/ssl/session_cache/ssl_session.h +1 -1
  267. data/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc +1 -1
  268. data/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +4 -4
  269. data/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +1 -1
  270. data/src/core/tsi/ssl_transport_security.cc +2 -1
  271. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +0 -4
  272. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +0 -6
  273. data/src/ruby/lib/grpc/version.rb +1 -1
  274. data/third_party/upb/upb/decode.c +1 -0
  275. metadata +34 -32
  276. data/src/core/ext/filters/client_channel/connector.cc +0 -41
  277. data/src/core/ext/filters/client_channel/proxy_mapper.cc +0 -48
  278. data/src/core/lib/gprpp/set.h +0 -33
@@ -22,7 +22,37 @@
22
22
  #include <grpc/support/port_platform.h>
23
23
 
24
24
  #include "src/core/ext/filters/client_channel/connector.h"
25
+ #include "src/core/lib/channel/handshaker.h"
26
+ #include "src/core/lib/channel/handshaker_registry.h"
25
27
 
26
- grpc_connector* grpc_chttp2_connector_create();
28
+ namespace grpc_core {
29
+
30
+ class Chttp2Connector : public SubchannelConnector {
31
+ public:
32
+ Chttp2Connector();
33
+ ~Chttp2Connector();
34
+
35
+ void Connect(const Args& args, Result* result, grpc_closure* notify) override;
36
+ void Shutdown(grpc_error* error) override;
37
+
38
+ private:
39
+ static void Connected(void* arg, grpc_error* error);
40
+ void StartHandshakeLocked();
41
+ static void OnHandshakeDone(void* arg, grpc_error* error);
42
+
43
+ Mutex mu_;
44
+ Args args_;
45
+ Result* result_ = nullptr;
46
+ grpc_closure* notify_ = nullptr;
47
+ bool shutdown_ = false;
48
+ bool connecting_ = false;
49
+ // Holds the endpoint when first created before being handed off to
50
+ // the handshake manager.
51
+ grpc_endpoint* endpoint_ = nullptr;
52
+ grpc_closure connected_;
53
+ RefCountedPtr<HandshakeManager> handshake_mgr_;
54
+ };
55
+
56
+ } // namespace grpc_core
27
57
 
28
58
  #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H */
@@ -40,9 +40,8 @@ class Chttp2InsecureClientChannelFactory : public ClientChannelFactory {
40
40
  Subchannel* CreateSubchannel(const grpc_channel_args* args) override {
41
41
  grpc_channel_args* new_args =
42
42
  grpc_default_authority_add_if_not_present(args);
43
- grpc_connector* connector = grpc_chttp2_connector_create();
44
- Subchannel* s = Subchannel::Create(connector, new_args);
45
- grpc_connector_unref(connector);
43
+ Subchannel* s =
44
+ Subchannel::Create(MakeOrphanable<Chttp2Connector>(), new_args);
46
45
  grpc_channel_args_destroy(new_args);
47
46
  return s;
48
47
  }
@@ -56,7 +55,7 @@ grpc_channel* CreateChannel(const char* target, const grpc_channel_args* args) {
56
55
  return nullptr;
57
56
  }
58
57
  // Add channel arg containing the server URI.
59
- UniquePtr<char> canonical_target =
58
+ grpc_core::UniquePtr<char> canonical_target =
60
59
  ResolverRegistry::AddDefaultPrefixIfNeeded(target);
61
60
  grpc_arg arg = grpc_channel_arg_string_create(
62
61
  const_cast<char*>(GRPC_ARG_SERVER_URI), canonical_target.get());
@@ -79,7 +78,7 @@ grpc_core::Chttp2InsecureClientChannelFactory* g_factory;
79
78
  gpr_once g_factory_once = GPR_ONCE_INIT;
80
79
 
81
80
  void FactoryInit() {
82
- g_factory = grpc_core::New<grpc_core::Chttp2InsecureClientChannelFactory>();
81
+ g_factory = new grpc_core::Chttp2InsecureClientChannelFactory();
83
82
  }
84
83
 
85
84
  } // namespace
@@ -99,7 +98,9 @@ grpc_channel* grpc_insecure_channel_create(const char* target,
99
98
  // Add channel arg containing the client channel factory.
100
99
  gpr_once_init(&g_factory_once, FactoryInit);
101
100
  grpc_arg arg = grpc_core::ClientChannelFactory::CreateChannelArg(g_factory);
102
- grpc_channel_args* new_args = grpc_channel_args_copy_and_add(args, &arg, 1);
101
+ const char* arg_to_remove = arg.key;
102
+ grpc_channel_args* new_args = grpc_channel_args_copy_and_add_and_remove(
103
+ args, &arg_to_remove, 1, &arg, 1);
103
104
  // Create channel.
104
105
  grpc_channel* channel = grpc_core::CreateChannel(target, new_args);
105
106
  // Clean up.
@@ -51,9 +51,8 @@ class Chttp2SecureClientChannelFactory : public ClientChannelFactory {
51
51
  "Failed to create channel args during subchannel creation.");
52
52
  return nullptr;
53
53
  }
54
- grpc_connector* connector = grpc_chttp2_connector_create();
55
- Subchannel* s = Subchannel::Create(connector, new_args);
56
- grpc_connector_unref(connector);
54
+ Subchannel* s =
55
+ Subchannel::Create(MakeOrphanable<Chttp2Connector>(), new_args);
57
56
  grpc_channel_args_destroy(new_args);
58
57
  return s;
59
58
  }
@@ -86,7 +85,7 @@ class Chttp2SecureClientChannelFactory : public ClientChannelFactory {
86
85
  GPR_ASSERT(server_uri != nullptr);
87
86
  const TargetAuthorityTable* target_authority_table =
88
87
  FindTargetAuthorityTableInArgs(args);
89
- UniquePtr<char> authority;
88
+ grpc_core::UniquePtr<char> authority;
90
89
  if (target_authority_table != nullptr) {
91
90
  // Find the authority for the target.
92
91
  const char* target_uri_str =
@@ -98,7 +97,8 @@ class Chttp2SecureClientChannelFactory : public ClientChannelFactory {
98
97
  const grpc_slice key = grpc_slice_from_static_string(
99
98
  target_uri->path[0] == '/' ? target_uri->path + 1
100
99
  : target_uri->path);
101
- const UniquePtr<char>* value = target_authority_table->Get(key);
100
+ const grpc_core::UniquePtr<char>* value =
101
+ target_authority_table->Get(key);
102
102
  if (value != nullptr) authority.reset(gpr_strdup(value->get()));
103
103
  grpc_slice_unref_internal(key);
104
104
  }
@@ -158,7 +158,7 @@ grpc_channel* CreateChannel(const char* target, const grpc_channel_args* args) {
158
158
  return nullptr;
159
159
  }
160
160
  // Add channel arg containing the server URI.
161
- UniquePtr<char> canonical_target =
161
+ grpc_core::UniquePtr<char> canonical_target =
162
162
  ResolverRegistry::AddDefaultPrefixIfNeeded(target);
163
163
  grpc_arg arg = grpc_channel_arg_string_create(
164
164
  const_cast<char*>(GRPC_ARG_SERVER_URI), canonical_target.get());
@@ -181,7 +181,7 @@ grpc_core::Chttp2SecureClientChannelFactory* g_factory;
181
181
  gpr_once g_factory_once = GPR_ONCE_INIT;
182
182
 
183
183
  void FactoryInit() {
184
- g_factory = grpc_core::New<grpc_core::Chttp2SecureClientChannelFactory>();
184
+ g_factory = new grpc_core::Chttp2SecureClientChannelFactory();
185
185
  }
186
186
 
187
187
  } // namespace
@@ -205,11 +205,13 @@ grpc_channel* grpc_secure_channel_create(grpc_channel_credentials* creds,
205
205
  // Add channel args containing the client channel factory and channel
206
206
  // credentials.
207
207
  gpr_once_init(&g_factory_once, FactoryInit);
208
- grpc_arg args_to_add[] = {
209
- grpc_core::ClientChannelFactory::CreateChannelArg(g_factory),
210
- grpc_channel_credentials_to_arg(creds)};
211
- grpc_channel_args* new_args = grpc_channel_args_copy_and_add(
212
- args, args_to_add, GPR_ARRAY_SIZE(args_to_add));
208
+ grpc_arg channel_factory_arg =
209
+ grpc_core::ClientChannelFactory::CreateChannelArg(g_factory);
210
+ grpc_arg args_to_add[] = {channel_factory_arg,
211
+ grpc_channel_credentials_to_arg(creds)};
212
+ const char* arg_to_remove = channel_factory_arg.key;
213
+ grpc_channel_args* new_args = grpc_channel_args_copy_and_add_and_remove(
214
+ args, &arg_to_remove, 1, args_to_add, GPR_ARRAY_SIZE(args_to_add));
213
215
  new_args = creds->update_arguments(new_args);
214
216
  // Create channel.
215
217
  channel = grpc_core::CreateChannel(target, new_args);
@@ -240,7 +240,7 @@ static void on_accept(void* arg, grpc_endpoint* tcp,
240
240
  }
241
241
 
242
242
  /* Server callback: start listening on our ports */
243
- static void server_start_listener(grpc_server* server, void* arg,
243
+ static void server_start_listener(grpc_server* /*server*/, void* arg,
244
244
  grpc_pollset** pollsets,
245
245
  size_t pollset_count) {
246
246
  server_state* state = static_cast<server_state*>(arg);
@@ -266,7 +266,8 @@ static void tcp_server_shutdown_complete(void* arg, grpc_error* error) {
266
266
  // may do a synchronous unref.
267
267
  grpc_core::ExecCtx::Get()->Flush();
268
268
  if (destroy_done != nullptr) {
269
- GRPC_CLOSURE_SCHED(destroy_done, GRPC_ERROR_REF(error));
269
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, destroy_done,
270
+ GRPC_ERROR_REF(error));
270
271
  grpc_core::ExecCtx::Get()->Flush();
271
272
  }
272
273
  grpc_channel_args_destroy(state->args);
@@ -276,7 +277,7 @@ static void tcp_server_shutdown_complete(void* arg, grpc_error* error) {
276
277
 
277
278
  /* Server callback: destroy the tcp listener (so we don't generate further
278
279
  callbacks) */
279
- static void server_destroy_listener(grpc_server* server, void* arg,
280
+ static void server_destroy_listener(grpc_server* /*server*/, void* arg,
280
281
  grpc_closure* destroy_done) {
281
282
  server_state* state = static_cast<server_state*>(arg);
282
283
  gpr_mu_lock(&state->mu);
@@ -416,8 +417,10 @@ grpc_error* grpc_chttp2_server_add_port(grpc_server* server, const char* addr,
416
417
  gpr_asprintf(&socket_name, "chttp2 listener %s", addr);
417
418
  state->channelz_listen_socket =
418
419
  grpc_core::MakeRefCounted<grpc_core::channelz::ListenSocketNode>(
419
- grpc_core::UniquePtr<char>(gpr_strdup(addr)),
420
- grpc_core::UniquePtr<char>(socket_name));
420
+ addr, socket_name);
421
+ // TODO(veblush): Remove this once gpr_asprintf is replaced by
422
+ // absl::StrFormat
423
+ gpr_free(socket_name);
421
424
  }
422
425
 
423
426
  /* Register with the server only upon success */
@@ -382,9 +382,10 @@ static bool read_channel_args(grpc_chttp2_transport* t,
382
382
  gpr_asprintf(&socket_name, "%s %s", get_vtable()->name, t->peer_string);
383
383
  t->channelz_socket =
384
384
  grpc_core::MakeRefCounted<grpc_core::channelz::SocketNode>(
385
- grpc_core::UniquePtr<char>(),
386
- grpc_core::UniquePtr<char>(gpr_strdup(t->peer_string)),
387
- grpc_core::UniquePtr<char>(socket_name));
385
+ "", t->peer_string, socket_name);
386
+ // TODO(veblush): Remove this once gpr_asprintf is replaced by
387
+ // absl::StrFormat
388
+ gpr_free(socket_name);
388
389
  }
389
390
  return enable_bdp;
390
391
  }
@@ -525,7 +526,7 @@ grpc_chttp2_transport::grpc_chttp2_transport(
525
526
  post_benign_reclaimer(this);
526
527
  }
527
528
 
528
- static void destroy_transport_locked(void* tp, grpc_error* error) {
529
+ static void destroy_transport_locked(void* tp, grpc_error* /*error*/) {
529
530
  grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp);
530
531
  t->destroying = 1;
531
532
  close_transport_locked(
@@ -593,7 +594,8 @@ static void close_transport_locked(grpc_chttp2_transport* t,
593
594
  grpc_endpoint_shutdown(t->ep, GRPC_ERROR_REF(error));
594
595
  }
595
596
  if (t->notify_on_receive_settings != nullptr) {
596
- GRPC_CLOSURE_SCHED(t->notify_on_receive_settings, GRPC_ERROR_CANCELLED);
597
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, t->notify_on_receive_settings,
598
+ GRPC_ERROR_CANCELLED);
597
599
  t->notify_on_receive_settings = nullptr;
598
600
  }
599
601
  GRPC_ERROR_UNREF(error);
@@ -706,7 +708,7 @@ grpc_chttp2_stream::~grpc_chttp2_stream() {
706
708
  }
707
709
 
708
710
  GRPC_CHTTP2_UNREF_TRANSPORT(t, "stream");
709
- GRPC_CLOSURE_SCHED(destroy_stream_arg, GRPC_ERROR_NONE);
711
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, destroy_stream_arg, GRPC_ERROR_NONE);
710
712
  }
711
713
 
712
714
  static int init_stream(grpc_transport* gt, grpc_stream* gs,
@@ -718,7 +720,7 @@ static int init_stream(grpc_transport* gt, grpc_stream* gs,
718
720
  return 0;
719
721
  }
720
722
 
721
- static void destroy_stream_locked(void* sp, grpc_error* error) {
723
+ static void destroy_stream_locked(void* sp, grpc_error* /*error*/) {
722
724
  GPR_TIMER_SCOPE("destroy_stream", 0);
723
725
  grpc_chttp2_stream* s = static_cast<grpc_chttp2_stream*>(sp);
724
726
  s->~grpc_chttp2_stream();
@@ -804,7 +806,7 @@ static void set_write_state(grpc_chttp2_transport* t,
804
806
  * to be closed after all writes finish (for example, if we received a go-away
805
807
  * from peer while we had some pending writes) */
806
808
  if (st == GRPC_CHTTP2_WRITE_STATE_IDLE) {
807
- GRPC_CLOSURE_LIST_SCHED(&t->run_after_write);
809
+ grpc_core::ExecCtx::RunList(DEBUG_LOCATION, &t->run_after_write);
808
810
  if (t->close_transport_on_writes_finished != nullptr) {
809
811
  grpc_error* err = t->close_transport_on_writes_finished;
810
812
  t->close_transport_on_writes_finished = nullptr;
@@ -935,7 +937,7 @@ static const char* begin_writing_desc(bool partial) {
935
937
  }
936
938
  }
937
939
 
938
- static void write_action_begin_locked(void* gt, grpc_error* error_ignored) {
940
+ static void write_action_begin_locked(void* gt, grpc_error* /*error_ignored*/) {
939
941
  GPR_TIMER_SCOPE("write_action_begin_locked", 0);
940
942
  grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(gt);
941
943
  GPR_ASSERT(t->write_state != GRPC_CHTTP2_WRITE_STATE_IDLE);
@@ -974,7 +976,7 @@ static void write_action_begin_locked(void* gt, grpc_error* error_ignored) {
974
976
  }
975
977
  }
976
978
 
977
- static void write_action(void* gt, grpc_error* error) {
979
+ static void write_action(void* gt, grpc_error* /*error*/) {
978
980
  GPR_TIMER_SCOPE("write_action", 0);
979
981
  grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(gt);
980
982
  void* cl = t->cl;
@@ -1031,7 +1033,7 @@ static void write_action_end_locked(void* tp, grpc_error* error) {
1031
1033
  // write finishes, or the callbacks will be invoked when the stream is
1032
1034
  // closed.
1033
1035
  if (!closed) {
1034
- GRPC_CLOSURE_LIST_SCHED(&t->run_after_write);
1036
+ grpc_core::ExecCtx::RunList(DEBUG_LOCATION, &t->run_after_write);
1035
1037
  }
1036
1038
  t->combiner->FinallyRun(
1037
1039
  GRPC_CLOSURE_INIT(&t->write_action_begin_locked,
@@ -1177,11 +1179,11 @@ static grpc_closure* add_closure_barrier(grpc_closure* closure) {
1177
1179
  static void null_then_sched_closure(grpc_closure** closure) {
1178
1180
  grpc_closure* c = *closure;
1179
1181
  *closure = nullptr;
1180
- GRPC_CLOSURE_SCHED(c, GRPC_ERROR_NONE);
1182
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, c, GRPC_ERROR_NONE);
1181
1183
  }
1182
1184
 
1183
1185
  void grpc_chttp2_complete_closure_step(grpc_chttp2_transport* t,
1184
- grpc_chttp2_stream* s,
1186
+ grpc_chttp2_stream* /*s*/,
1185
1187
  grpc_closure** pclosure,
1186
1188
  grpc_error* error, const char* desc) {
1187
1189
  grpc_closure* closure = *pclosure;
@@ -1220,7 +1222,8 @@ void grpc_chttp2_complete_closure_step(grpc_chttp2_transport* t,
1220
1222
  !(closure->next_data.scratch & CLOSURE_BARRIER_MAY_COVER_WRITE)) {
1221
1223
  // Using GRPC_CLOSURE_SCHED instead of GRPC_CLOSURE_RUN to avoid running
1222
1224
  // closures earlier than when it is safe to do so.
1223
- GRPC_CLOSURE_SCHED(closure, closure->error_data.error);
1225
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure,
1226
+ closure->error_data.error);
1224
1227
  } else {
1225
1228
  grpc_closure_list_append(&t->run_after_write, closure,
1226
1229
  closure->error_data.error);
@@ -1338,7 +1341,7 @@ static void log_metadata(const grpc_metadata_batch* md_batch, uint32_t id,
1338
1341
  }
1339
1342
 
1340
1343
  static void perform_stream_op_locked(void* stream_op,
1341
- grpc_error* error_ignored) {
1344
+ grpc_error* /*error_ignored*/) {
1342
1345
  GPR_TIMER_SCOPE("perform_stream_op_locked", 0);
1343
1346
 
1344
1347
  grpc_transport_stream_op_batch* op =
@@ -1670,7 +1673,7 @@ static void cancel_pings(grpc_chttp2_transport* t, grpc_error* error) {
1670
1673
  GPR_ASSERT(error != GRPC_ERROR_NONE);
1671
1674
  for (size_t j = 0; j < GRPC_CHTTP2_PCL_COUNT; j++) {
1672
1675
  grpc_closure_list_fail_all(&pq->lists[j], GRPC_ERROR_REF(error));
1673
- GRPC_CLOSURE_LIST_SCHED(&pq->lists[j]);
1676
+ grpc_core::ExecCtx::RunList(DEBUG_LOCATION, &pq->lists[j]);
1674
1677
  }
1675
1678
  GRPC_ERROR_UNREF(error);
1676
1679
  }
@@ -1678,8 +1681,10 @@ static void cancel_pings(grpc_chttp2_transport* t, grpc_error* error) {
1678
1681
  static void send_ping_locked(grpc_chttp2_transport* t,
1679
1682
  grpc_closure* on_initiate, grpc_closure* on_ack) {
1680
1683
  if (t->closed_with_error != GRPC_ERROR_NONE) {
1681
- GRPC_CLOSURE_SCHED(on_initiate, GRPC_ERROR_REF(t->closed_with_error));
1682
- GRPC_CLOSURE_SCHED(on_ack, GRPC_ERROR_REF(t->closed_with_error));
1684
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, on_initiate,
1685
+ GRPC_ERROR_REF(t->closed_with_error));
1686
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, on_ack,
1687
+ GRPC_ERROR_REF(t->closed_with_error));
1683
1688
  return;
1684
1689
  }
1685
1690
  grpc_chttp2_ping_queue* pq = &t->ping_queue;
@@ -1754,7 +1759,8 @@ void grpc_chttp2_ack_ping(grpc_chttp2_transport* t, uint64_t id) {
1754
1759
  gpr_free(from);
1755
1760
  return;
1756
1761
  }
1757
- GRPC_CLOSURE_LIST_SCHED(&pq->lists[GRPC_CHTTP2_PCL_INFLIGHT]);
1762
+ grpc_core::ExecCtx::RunList(DEBUG_LOCATION,
1763
+ &pq->lists[GRPC_CHTTP2_PCL_INFLIGHT]);
1758
1764
  if (!grpc_closure_list_empty(pq->lists[GRPC_CHTTP2_PCL_NEXT])) {
1759
1765
  grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_CONTINUE_PINGS);
1760
1766
  }
@@ -1792,7 +1798,7 @@ void grpc_chttp2_add_ping_strike(grpc_chttp2_transport* t) {
1792
1798
  }
1793
1799
 
1794
1800
  static void perform_transport_op_locked(void* stream_op,
1795
- grpc_error* error_ignored) {
1801
+ grpc_error* /*error_ignored*/) {
1796
1802
  grpc_transport_op* op = static_cast<grpc_transport_op*>(stream_op);
1797
1803
  grpc_chttp2_transport* t =
1798
1804
  static_cast<grpc_chttp2_transport*>(op->handler_private.extra_arg);
@@ -1831,7 +1837,7 @@ static void perform_transport_op_locked(void* stream_op,
1831
1837
  close_transport_locked(t, op->disconnect_with_error);
1832
1838
  }
1833
1839
 
1834
- GRPC_CLOSURE_RUN(op->on_consumed, GRPC_ERROR_NONE);
1840
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, op->on_consumed, GRPC_ERROR_NONE);
1835
1841
 
1836
1842
  GRPC_CHTTP2_UNREF_TRANSPORT(t, "transport_op");
1837
1843
  }
@@ -1854,8 +1860,8 @@ static void perform_transport_op(grpc_transport* gt, grpc_transport_op* op) {
1854
1860
  * INPUT PROCESSING - GENERAL
1855
1861
  */
1856
1862
 
1857
- void grpc_chttp2_maybe_complete_recv_initial_metadata(grpc_chttp2_transport* t,
1858
- grpc_chttp2_stream* s) {
1863
+ void grpc_chttp2_maybe_complete_recv_initial_metadata(
1864
+ grpc_chttp2_transport* /*t*/, grpc_chttp2_stream* s) {
1859
1865
  if (s->recv_initial_metadata_ready != nullptr &&
1860
1866
  s->published_metadata[0] != GRPC_METADATA_NOT_PUBLISHED) {
1861
1867
  if (s->seen_error) {
@@ -1871,7 +1877,7 @@ void grpc_chttp2_maybe_complete_recv_initial_metadata(grpc_chttp2_transport* t,
1871
1877
  }
1872
1878
  }
1873
1879
 
1874
- void grpc_chttp2_maybe_complete_recv_message(grpc_chttp2_transport* t,
1880
+ void grpc_chttp2_maybe_complete_recv_message(grpc_chttp2_transport* /*t*/,
1875
1881
  grpc_chttp2_stream* s) {
1876
1882
  grpc_error* error = GRPC_ERROR_NONE;
1877
1883
  if (s->recv_message_ready != nullptr) {
@@ -2400,7 +2406,7 @@ typedef struct {
2400
2406
  grpc_chttp2_transport* t;
2401
2407
  } cancel_stream_cb_args;
2402
2408
 
2403
- static void cancel_stream_cb(void* user_data, uint32_t key, void* stream) {
2409
+ static void cancel_stream_cb(void* user_data, uint32_t /*key*/, void* stream) {
2404
2410
  cancel_stream_cb_args* args = static_cast<cancel_stream_cb_args*>(user_data);
2405
2411
  grpc_chttp2_stream* s = static_cast<grpc_chttp2_stream*>(stream);
2406
2412
  grpc_chttp2_cancel_stream(args->t, s, GRPC_ERROR_REF(args->error));
@@ -2909,13 +2915,13 @@ static void connectivity_state_set(grpc_chttp2_transport* t,
2909
2915
  * POLLSET STUFF
2910
2916
  */
2911
2917
 
2912
- static void set_pollset(grpc_transport* gt, grpc_stream* gs,
2918
+ static void set_pollset(grpc_transport* gt, grpc_stream* /*gs*/,
2913
2919
  grpc_pollset* pollset) {
2914
2920
  grpc_chttp2_transport* t = reinterpret_cast<grpc_chttp2_transport*>(gt);
2915
2921
  grpc_endpoint_add_to_pollset(t->ep, pollset);
2916
2922
  }
2917
2923
 
2918
- static void set_pollset_set(grpc_transport* gt, grpc_stream* gs,
2924
+ static void set_pollset_set(grpc_transport* gt, grpc_stream* /*gs*/,
2919
2925
  grpc_pollset_set* pollset_set) {
2920
2926
  grpc_chttp2_transport* t = reinterpret_cast<grpc_chttp2_transport*>(gt);
2921
2927
  grpc_endpoint_add_to_pollset_set(t->ep, pollset_set);
@@ -2933,7 +2939,7 @@ static void reset_byte_stream(void* arg, grpc_error* error) {
2933
2939
  grpc_chttp2_maybe_complete_recv_trailing_metadata(s->t, s);
2934
2940
  } else {
2935
2941
  GPR_ASSERT(error != GRPC_ERROR_NONE);
2936
- GRPC_CLOSURE_SCHED(s->on_next, GRPC_ERROR_REF(error));
2942
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, s->on_next, GRPC_ERROR_REF(error));
2937
2943
  s->on_next = nullptr;
2938
2944
  GRPC_ERROR_UNREF(s->byte_stream_error);
2939
2945
  s->byte_stream_error = GRPC_ERROR_NONE;
@@ -2957,7 +2963,7 @@ Chttp2IncomingByteStream::Chttp2IncomingByteStream(
2957
2963
  }
2958
2964
 
2959
2965
  void Chttp2IncomingByteStream::OrphanLocked(void* arg,
2960
- grpc_error* error_ignored) {
2966
+ grpc_error* /*error_ignored*/) {
2961
2967
  Chttp2IncomingByteStream* bs = static_cast<Chttp2IncomingByteStream*>(arg);
2962
2968
  grpc_chttp2_stream* s = bs->stream_;
2963
2969
  grpc_chttp2_transport* t = s->t;
@@ -2976,7 +2982,7 @@ void Chttp2IncomingByteStream::Orphan() {
2976
2982
  }
2977
2983
 
2978
2984
  void Chttp2IncomingByteStream::NextLocked(void* arg,
2979
- grpc_error* error_ignored) {
2985
+ grpc_error* /*error_ignored*/) {
2980
2986
  Chttp2IncomingByteStream* bs = static_cast<Chttp2IncomingByteStream*>(arg);
2981
2987
  grpc_chttp2_transport* t = bs->transport_;
2982
2988
  grpc_chttp2_stream* s = bs->stream_;
@@ -2991,10 +2997,11 @@ void Chttp2IncomingByteStream::NextLocked(void* arg,
2991
2997
  grpc_slice_buffer_swap(&s->frame_storage,
2992
2998
  &s->unprocessed_incoming_frames_buffer);
2993
2999
  s->unprocessed_incoming_frames_decompressed = false;
2994
- GRPC_CLOSURE_SCHED(bs->next_action_.on_complete, GRPC_ERROR_NONE);
3000
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, bs->next_action_.on_complete,
3001
+ GRPC_ERROR_NONE);
2995
3002
  } else if (s->byte_stream_error != GRPC_ERROR_NONE) {
2996
- GRPC_CLOSURE_SCHED(bs->next_action_.on_complete,
2997
- GRPC_ERROR_REF(s->byte_stream_error));
3003
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, bs->next_action_.on_complete,
3004
+ GRPC_ERROR_REF(s->byte_stream_error));
2998
3005
  if (s->data_parser.parsing_frame != nullptr) {
2999
3006
  s->data_parser.parsing_frame->Unref();
3000
3007
  s->data_parser.parsing_frame = nullptr;
@@ -3003,8 +3010,8 @@ void Chttp2IncomingByteStream::NextLocked(void* arg,
3003
3010
  if (bs->remaining_bytes_ != 0) {
3004
3011
  s->byte_stream_error =
3005
3012
  GRPC_ERROR_CREATE_FROM_STATIC_STRING("Truncated message");
3006
- GRPC_CLOSURE_SCHED(bs->next_action_.on_complete,
3007
- GRPC_ERROR_REF(s->byte_stream_error));
3013
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, bs->next_action_.on_complete,
3014
+ GRPC_ERROR_REF(s->byte_stream_error));
3008
3015
  if (s->data_parser.parsing_frame != nullptr) {
3009
3016
  s->data_parser.parsing_frame->Unref();
3010
3017
  s->data_parser.parsing_frame = nullptr;
@@ -3092,7 +3099,8 @@ grpc_error* Chttp2IncomingByteStream::Pull(grpc_slice* slice) {
3092
3099
 
3093
3100
  void Chttp2IncomingByteStream::PublishError(grpc_error* error) {
3094
3101
  GPR_ASSERT(error != GRPC_ERROR_NONE);
3095
- GRPC_CLOSURE_SCHED(stream_->on_next, GRPC_ERROR_REF(error));
3102
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, stream_->on_next,
3103
+ GRPC_ERROR_REF(error));
3096
3104
  stream_->on_next = nullptr;
3097
3105
  GRPC_ERROR_UNREF(stream_->byte_stream_error);
3098
3106
  stream_->byte_stream_error = GRPC_ERROR_REF(error);
@@ -3316,8 +3324,8 @@ grpc_chttp2_transport_get_socket_node(grpc_transport* transport) {
3316
3324
  grpc_transport* grpc_create_chttp2_transport(
3317
3325
  const grpc_channel_args* channel_args, grpc_endpoint* ep, bool is_client,
3318
3326
  grpc_resource_user* resource_user) {
3319
- auto t = grpc_core::New<grpc_chttp2_transport>(channel_args, ep, is_client,
3320
- resource_user);
3327
+ auto t =
3328
+ new grpc_chttp2_transport(channel_args, ep, is_client, resource_user);
3321
3329
  return &t->base;
3322
3330
  }
3323
3331