grpc 1.8.7 → 1.9.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 (488) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +549 -325
  3. data/include/grpc/impl/codegen/grpc_types.h +1 -2
  4. data/include/grpc/impl/codegen/port_platform.h +46 -5
  5. data/include/grpc/impl/codegen/slice.h +1 -2
  6. data/include/grpc/module.modulemap +0 -2
  7. data/include/grpc/slice_buffer.h +1 -2
  8. data/include/grpc/support/log.h +4 -2
  9. data/include/grpc/support/thd.h +4 -1
  10. data/include/grpc/support/tls.h +6 -0
  11. data/include/grpc/support/tls_gcc.h +5 -40
  12. data/include/grpc/support/tls_msvc.h +9 -0
  13. data/include/grpc/support/tls_pthread.h +9 -0
  14. data/src/core/ext/filters/client_channel/backup_poller.cc +32 -29
  15. data/src/core/ext/filters/client_channel/backup_poller.h +2 -2
  16. data/src/core/ext/filters/client_channel/channel_connectivity.cc +26 -32
  17. data/src/core/ext/filters/client_channel/client_channel.cc +325 -356
  18. data/src/core/ext/filters/client_channel/client_channel.h +4 -12
  19. data/src/core/ext/filters/client_channel/client_channel_factory.cc +9 -14
  20. data/src/core/ext/filters/client_channel/client_channel_factory.h +7 -20
  21. data/src/core/ext/filters/client_channel/client_channel_plugin.cc +7 -10
  22. data/src/core/ext/filters/client_channel/connector.cc +6 -7
  23. data/src/core/ext/filters/client_channel/connector.h +6 -16
  24. data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +38 -50
  25. data/src/core/ext/filters/client_channel/http_connect_handshaker.h +0 -8
  26. data/src/core/ext/filters/client_channel/http_proxy.cc +9 -13
  27. data/src/core/ext/filters/client_channel/http_proxy.h +0 -8
  28. data/src/core/ext/filters/client_channel/lb_policy.cc +72 -94
  29. data/src/core/ext/filters/client_channel/lb_policy.h +83 -92
  30. data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +14 -19
  31. data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h +0 -8
  32. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +474 -591
  33. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h +0 -8
  34. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h +2 -10
  35. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +6 -6
  36. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +0 -8
  37. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +0 -9
  38. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +0 -9
  39. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c +3 -4
  40. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h +9 -12
  41. data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +160 -182
  42. data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +182 -221
  43. data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc +24 -35
  44. data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +9 -20
  45. data/src/core/ext/filters/client_channel/lb_policy_factory.cc +6 -9
  46. data/src/core/ext/filters/client_channel/lb_policy_factory.h +4 -15
  47. data/src/core/ext/filters/client_channel/lb_policy_registry.cc +3 -3
  48. data/src/core/ext/filters/client_channel/lb_policy_registry.h +1 -9
  49. data/src/core/ext/filters/client_channel/parse_address.cc +1 -1
  50. data/src/core/ext/filters/client_channel/parse_address.h +0 -8
  51. data/src/core/ext/filters/client_channel/proxy_mapper.cc +6 -8
  52. data/src/core/ext/filters/client_channel/proxy_mapper.h +6 -16
  53. data/src/core/ext/filters/client_channel/proxy_mapper_registry.cc +13 -17
  54. data/src/core/ext/filters/client_channel/proxy_mapper_registry.h +2 -12
  55. data/src/core/ext/filters/client_channel/resolver.cc +11 -13
  56. data/src/core/ext/filters/client_channel/resolver.h +14 -25
  57. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +57 -70
  58. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +2 -12
  59. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +23 -31
  60. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +27 -45
  61. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +5 -15
  62. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc +9 -11
  63. data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +53 -66
  64. data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +25 -33
  65. data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +1 -9
  66. data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +26 -35
  67. data/src/core/ext/filters/client_channel/resolver_factory.cc +2 -3
  68. data/src/core/ext/filters/client_channel/resolver_factory.h +2 -12
  69. data/src/core/ext/filters/client_channel/resolver_registry.cc +12 -15
  70. data/src/core/ext/filters/client_channel/resolver_registry.h +3 -12
  71. data/src/core/ext/filters/client_channel/retry_throttle.h +0 -8
  72. data/src/core/ext/filters/client_channel/subchannel.cc +289 -301
  73. data/src/core/ext/filters/client_channel/subchannel.h +57 -84
  74. data/src/core/ext/filters/client_channel/subchannel_index.cc +30 -33
  75. data/src/core/ext/filters/client_channel/subchannel_index.h +4 -16
  76. data/src/core/ext/filters/client_channel/uri_parser.cc +13 -17
  77. data/src/core/ext/filters/client_channel/uri_parser.h +1 -10
  78. data/src/core/ext/filters/deadline/deadline_filter.cc +49 -67
  79. data/src/core/ext/filters/deadline/deadline_filter.h +4 -14
  80. data/src/core/ext/filters/http/client/http_client_filter.cc +60 -77
  81. data/src/core/ext/filters/http/client/http_client_filter.h +0 -8
  82. data/src/core/ext/filters/http/http_filters_plugin.cc +4 -6
  83. data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +63 -79
  84. data/src/core/ext/filters/http/message_compress/message_compress_filter.h +0 -8
  85. data/src/core/ext/filters/http/server/http_server_filter.cc +57 -71
  86. data/src/core/ext/filters/http/server/http_server_filter.h +0 -8
  87. data/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc +19 -24
  88. data/src/core/ext/filters/load_reporting/server_load_reporting_filter.h +0 -8
  89. data/src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc +3 -3
  90. data/src/core/ext/filters/load_reporting/server_load_reporting_plugin.h +0 -8
  91. data/src/core/ext/filters/max_age/max_age_filter.cc +49 -62
  92. data/src/core/ext/filters/max_age/max_age_filter.h +0 -8
  93. data/src/core/ext/filters/message_size/message_size_filter.cc +23 -29
  94. data/src/core/ext/filters/message_size/message_size_filter.h +0 -8
  95. data/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc +15 -18
  96. data/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h +0 -8
  97. data/src/core/ext/filters/workarounds/workaround_utils.h +0 -8
  98. data/src/core/ext/transport/chttp2/alpn/alpn.h +0 -8
  99. data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +33 -40
  100. data/src/core/ext/transport/chttp2/client/chttp2_connector.h +0 -8
  101. data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +15 -17
  102. data/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc +8 -8
  103. data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +23 -28
  104. data/src/core/ext/transport/chttp2/server/chttp2_server.cc +50 -57
  105. data/src/core/ext/transport/chttp2/server/chttp2_server.h +1 -10
  106. data/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc +3 -3
  107. data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +7 -10
  108. data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc +5 -6
  109. data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +7 -9
  110. data/src/core/ext/transport/chttp2/transport/bin_decoder.h +2 -11
  111. data/src/core/ext/transport/chttp2/transport/bin_encoder.h +1 -9
  112. data/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc +10 -2
  113. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +516 -636
  114. data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +4 -11
  115. data/src/core/ext/transport/chttp2/transport/flow_control.cc +29 -13
  116. data/src/core/ext/transport/chttp2/transport/flow_control.h +196 -53
  117. data/src/core/ext/transport/chttp2/transport/frame.h +0 -8
  118. data/src/core/ext/transport/chttp2/transport/frame_data.cc +31 -33
  119. data/src/core/ext/transport/chttp2/transport/frame_data.h +3 -12
  120. data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +2 -3
  121. data/src/core/ext/transport/chttp2/transport/frame_goaway.h +1 -10
  122. data/src/core/ext/transport/chttp2/transport/frame_ping.cc +5 -6
  123. data/src/core/ext/transport/chttp2/transport/frame_ping.h +1 -9
  124. data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +2 -3
  125. data/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +1 -10
  126. data/src/core/ext/transport/chttp2/transport/frame_settings.cc +8 -3
  127. data/src/core/ext/transport/chttp2/transport/frame_settings.h +1 -10
  128. data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +8 -8
  129. data/src/core/ext/transport/chttp2/transport/frame_window_update.h +5 -11
  130. data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +63 -81
  131. data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +2 -12
  132. data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +230 -318
  133. data/src/core/ext/transport/chttp2/transport/hpack_parser.h +6 -19
  134. data/src/core/ext/transport/chttp2/transport/hpack_table.cc +14 -20
  135. data/src/core/ext/transport/chttp2/transport/hpack_table.h +5 -16
  136. data/src/core/ext/transport/chttp2/transport/http2_settings.h +0 -7
  137. data/src/core/ext/transport/chttp2/transport/huffsyms.h +0 -8
  138. data/src/core/ext/transport/chttp2/transport/incoming_metadata.cc +8 -11
  139. data/src/core/ext/transport/chttp2/transport/incoming_metadata.h +4 -13
  140. data/src/core/ext/transport/chttp2/transport/internal.h +51 -75
  141. data/src/core/ext/transport/chttp2/transport/parsing.cc +83 -109
  142. data/src/core/ext/transport/chttp2/transport/stream_lists.cc +2 -0
  143. data/src/core/ext/transport/chttp2/transport/stream_map.h +0 -8
  144. data/src/core/ext/transport/chttp2/transport/varint.h +0 -8
  145. data/src/core/ext/transport/chttp2/transport/writing.cc +61 -65
  146. data/src/core/ext/transport/inproc/inproc_plugin.cc +2 -4
  147. data/src/core/ext/transport/inproc/inproc_transport.cc +177 -188
  148. data/src/core/ext/transport/inproc/inproc_transport.h +0 -8
  149. data/src/core/lib/backoff/backoff.cc +39 -44
  150. data/src/core/lib/backoff/backoff.h +61 -57
  151. data/src/core/lib/channel/channel_args.cc +8 -10
  152. data/src/core/lib/channel/channel_args.h +4 -13
  153. data/src/core/lib/channel/channel_stack.cc +19 -27
  154. data/src/core/lib/channel/channel_stack.h +27 -47
  155. data/src/core/lib/channel/channel_stack_builder.cc +11 -14
  156. data/src/core/lib/channel/channel_stack_builder.h +4 -15
  157. data/src/core/lib/channel/connected_channel.cc +23 -36
  158. data/src/core/lib/channel/connected_channel.h +1 -10
  159. data/src/core/lib/channel/handshaker.cc +31 -40
  160. data/src/core/lib/channel/handshaker.h +14 -25
  161. data/src/core/lib/channel/handshaker_factory.cc +6 -6
  162. data/src/core/lib/channel/handshaker_factory.h +5 -15
  163. data/src/core/lib/channel/handshaker_registry.cc +9 -13
  164. data/src/core/lib/channel/handshaker_registry.h +2 -11
  165. data/src/core/lib/compression/algorithm_metadata.h +0 -8
  166. data/src/core/lib/compression/message_compress.cc +19 -23
  167. data/src/core/lib/compression/message_compress.h +2 -12
  168. data/src/core/lib/compression/stream_compression.cc +1 -1
  169. data/src/core/lib/compression/stream_compression.h +0 -8
  170. data/src/core/lib/compression/stream_compression_gzip.cc +12 -11
  171. data/src/core/lib/compression/stream_compression_gzip.h +0 -8
  172. data/src/core/lib/compression/stream_compression_identity.h +0 -8
  173. data/src/core/lib/debug/stats.cc +4 -4
  174. data/src/core/lib/debug/stats.h +9 -19
  175. data/src/core/lib/debug/stats_data.cc +85 -116
  176. data/src/core/lib/debug/stats_data.h +236 -312
  177. data/src/core/lib/debug/trace.cc +1 -1
  178. data/src/core/lib/debug/trace.h +0 -12
  179. data/src/core/lib/{support → gpr++}/abstract.h +8 -3
  180. data/src/core/lib/{support → gpr++}/atomic.h +5 -5
  181. data/src/core/lib/{support → gpr++}/atomic_with_atm.h +3 -3
  182. data/src/core/lib/{support → gpr++}/atomic_with_std.h +3 -3
  183. data/src/core/lib/gpr++/debug_location.h +52 -0
  184. data/src/core/lib/gpr++/inlined_vector.h +112 -0
  185. data/src/core/lib/{support → gpr++}/manual_constructor.h +2 -2
  186. data/src/core/lib/{support → gpr++}/memory.h +3 -3
  187. data/src/core/lib/gpr++/orphanable.h +171 -0
  188. data/src/core/lib/gpr++/ref_counted.h +133 -0
  189. data/src/core/lib/gpr++/ref_counted_ptr.h +99 -0
  190. data/src/core/lib/{support → gpr}/alloc.cc +0 -0
  191. data/src/core/lib/{support → gpr}/arena.cc +1 -1
  192. data/src/core/lib/{support → gpr}/arena.h +3 -11
  193. data/src/core/lib/{support → gpr}/atm.cc +0 -0
  194. data/src/core/lib/{support → gpr}/avl.cc +0 -0
  195. data/src/core/lib/{support → gpr}/cmdline.cc +1 -1
  196. data/src/core/lib/{support → gpr}/cpu_iphone.cc +0 -0
  197. data/src/core/lib/{support → gpr}/cpu_linux.cc +0 -0
  198. data/src/core/lib/{support → gpr}/cpu_posix.cc +0 -0
  199. data/src/core/lib/{support → gpr}/cpu_windows.cc +0 -0
  200. data/src/core/lib/{support → gpr}/env.h +3 -11
  201. data/src/core/lib/{support → gpr}/env_linux.cc +2 -2
  202. data/src/core/lib/{support → gpr}/env_posix.cc +4 -4
  203. data/src/core/lib/{support → gpr}/env_windows.cc +3 -3
  204. data/src/core/lib/{support → gpr}/fork.cc +3 -3
  205. data/src/core/lib/{support → gpr}/fork.h +3 -3
  206. data/src/core/lib/{support → gpr}/host_port.cc +1 -1
  207. data/src/core/lib/{support → gpr}/log.cc +3 -3
  208. data/src/core/lib/{support → gpr}/log_android.cc +3 -3
  209. data/src/core/lib/{support → gpr}/log_linux.cc +1 -1
  210. data/src/core/lib/{support → gpr}/log_posix.cc +5 -5
  211. data/src/core/lib/{support → gpr}/log_windows.cc +3 -3
  212. data/src/core/lib/{support → gpr}/mpscq.cc +1 -1
  213. data/src/core/lib/{support → gpr}/mpscq.h +3 -10
  214. data/src/core/lib/{support → gpr}/murmur_hash.cc +1 -1
  215. data/src/core/lib/{support → gpr}/murmur_hash.h +3 -11
  216. data/src/core/lib/{support → gpr}/spinlock.h +3 -3
  217. data/src/core/lib/{support → gpr}/string.cc +1 -1
  218. data/src/core/lib/{support → gpr}/string.h +3 -10
  219. data/src/core/lib/{support → gpr}/string_posix.cc +0 -0
  220. data/src/core/lib/{support → gpr}/string_util_windows.cc +2 -2
  221. data/src/core/lib/{support → gpr}/string_windows.cc +1 -1
  222. data/src/core/lib/{support → gpr}/string_windows.h +3 -11
  223. data/src/core/lib/{support → gpr}/subprocess_posix.cc +0 -0
  224. data/src/core/lib/{support → gpr}/subprocess_windows.cc +2 -2
  225. data/src/core/lib/{support → gpr}/sync.cc +0 -0
  226. data/src/core/lib/{support → gpr}/sync_posix.cc +10 -1
  227. data/src/core/lib/{support → gpr}/sync_windows.cc +0 -0
  228. data/src/core/lib/{support → gpr}/thd.cc +0 -0
  229. data/src/core/lib/{support → gpr}/thd_internal.h +3 -3
  230. data/src/core/lib/{support → gpr}/thd_posix.cc +18 -2
  231. data/src/core/lib/{support → gpr}/thd_windows.cc +2 -1
  232. data/src/core/lib/{support → gpr}/time.cc +0 -0
  233. data/src/core/lib/{support → gpr}/time_posix.cc +2 -4
  234. data/src/core/lib/{support → gpr}/time_precise.cc +1 -1
  235. data/src/core/lib/{support → gpr}/time_precise.h +3 -11
  236. data/src/core/lib/{support → gpr}/time_windows.cc +1 -3
  237. data/src/core/lib/{support → gpr}/tls_pthread.cc +0 -0
  238. data/src/core/lib/{support → gpr}/tmpfile.h +3 -11
  239. data/src/core/lib/{support → gpr}/tmpfile_msys.cc +2 -2
  240. data/src/core/lib/{support → gpr}/tmpfile_posix.cc +2 -2
  241. data/src/core/lib/{support → gpr}/tmpfile_windows.cc +2 -2
  242. data/src/core/lib/{support → gpr}/wrap_memcpy.cc +0 -0
  243. data/src/core/lib/http/format_request.cc +1 -1
  244. data/src/core/lib/http/format_request.h +0 -8
  245. data/src/core/lib/http/httpcli.cc +55 -74
  246. data/src/core/lib/http/httpcli.h +13 -22
  247. data/src/core/lib/http/httpcli_security_connector.cc +27 -33
  248. data/src/core/lib/http/parser.h +0 -8
  249. data/src/core/lib/iomgr/block_annotate.h +10 -17
  250. data/src/core/lib/iomgr/call_combiner.cc +14 -17
  251. data/src/core/lib/iomgr/call_combiner.h +16 -34
  252. data/src/core/lib/iomgr/closure.h +24 -37
  253. data/src/core/lib/iomgr/combiner.cc +62 -66
  254. data/src/core/lib/iomgr/combiner.h +6 -16
  255. data/src/core/lib/iomgr/endpoint.cc +15 -21
  256. data/src/core/lib/iomgr/endpoint.h +16 -33
  257. data/src/core/lib/iomgr/endpoint_pair.h +0 -8
  258. data/src/core/lib/iomgr/endpoint_pair_posix.cc +4 -5
  259. data/src/core/lib/iomgr/endpoint_pair_windows.cc +4 -6
  260. data/src/core/lib/iomgr/error.cc +2 -6
  261. data/src/core/lib/iomgr/error.h +4 -9
  262. data/src/core/lib/iomgr/error_internal.h +0 -8
  263. data/src/core/lib/iomgr/ev_epoll1_linux.cc +110 -117
  264. data/src/core/lib/iomgr/ev_epoll1_linux.h +0 -8
  265. data/src/core/lib/iomgr/ev_epollex_linux.cc +111 -141
  266. data/src/core/lib/iomgr/ev_epollex_linux.h +0 -8
  267. data/src/core/lib/iomgr/ev_epollsig_linux.cc +83 -109
  268. data/src/core/lib/iomgr/ev_epollsig_linux.h +2 -10
  269. data/src/core/lib/iomgr/ev_poll_posix.cc +103 -125
  270. data/src/core/lib/iomgr/ev_poll_posix.h +0 -8
  271. data/src/core/lib/iomgr/ev_posix.cc +35 -50
  272. data/src/core/lib/iomgr/ev_posix.h +27 -53
  273. data/src/core/lib/iomgr/exec_ctx.cc +46 -78
  274. data/src/core/lib/iomgr/exec_ctx.h +127 -60
  275. data/src/core/lib/iomgr/executor.cc +34 -38
  276. data/src/core/lib/iomgr/executor.h +3 -11
  277. data/src/core/lib/iomgr/fork_posix.cc +13 -12
  278. data/src/core/lib/iomgr/gethostname.h +0 -8
  279. data/src/core/lib/iomgr/gethostname_sysconf.cc +1 -1
  280. data/src/core/lib/iomgr/iocp_windows.cc +14 -16
  281. data/src/core/lib/iomgr/iocp_windows.h +1 -10
  282. data/src/core/lib/iomgr/iomgr.cc +60 -59
  283. data/src/core/lib/iomgr/iomgr.h +3 -12
  284. data/src/core/lib/iomgr/iomgr_internal.h +0 -8
  285. data/src/core/lib/iomgr/iomgr_uv.cc +2 -3
  286. data/src/core/lib/iomgr/iomgr_uv.h +0 -8
  287. data/src/core/lib/iomgr/is_epollexclusive_available.cc +1 -1
  288. data/src/core/lib/iomgr/load_file.cc +1 -1
  289. data/src/core/lib/iomgr/load_file.h +0 -8
  290. data/src/core/lib/iomgr/lockfree_event.cc +7 -8
  291. data/src/core/lib/iomgr/lockfree_event.h +3 -3
  292. data/src/core/lib/iomgr/polling_entity.cc +6 -10
  293. data/src/core/lib/iomgr/polling_entity.h +2 -11
  294. data/src/core/lib/iomgr/pollset.h +4 -13
  295. data/src/core/lib/iomgr/pollset_set.h +5 -18
  296. data/src/core/lib/iomgr/pollset_set_uv.cc +5 -10
  297. data/src/core/lib/iomgr/pollset_set_windows.cc +5 -10
  298. data/src/core/lib/iomgr/pollset_uv.cc +8 -9
  299. data/src/core/lib/iomgr/pollset_uv.h +0 -8
  300. data/src/core/lib/iomgr/pollset_windows.cc +14 -15
  301. data/src/core/lib/iomgr/pollset_windows.h +0 -8
  302. data/src/core/lib/iomgr/port.h +6 -1
  303. data/src/core/lib/iomgr/resolve_address.h +1 -10
  304. data/src/core/lib/iomgr/resolve_address_posix.cc +10 -12
  305. data/src/core/lib/iomgr/resolve_address_uv.cc +7 -8
  306. data/src/core/lib/iomgr/resolve_address_windows.cc +8 -9
  307. data/src/core/lib/iomgr/resource_quota.cc +77 -107
  308. data/src/core/lib/iomgr/resource_quota.h +8 -25
  309. data/src/core/lib/iomgr/sockaddr_utils.cc +1 -1
  310. data/src/core/lib/iomgr/sockaddr_utils.h +0 -8
  311. data/src/core/lib/iomgr/socket_factory_posix.cc +1 -1
  312. data/src/core/lib/iomgr/socket_factory_posix.h +0 -8
  313. data/src/core/lib/iomgr/socket_mutator.cc +1 -1
  314. data/src/core/lib/iomgr/socket_mutator.h +1 -9
  315. data/src/core/lib/iomgr/socket_utils.h +0 -8
  316. data/src/core/lib/iomgr/socket_utils_common_posix.cc +1 -1
  317. data/src/core/lib/iomgr/socket_utils_posix.h +0 -8
  318. data/src/core/lib/iomgr/socket_windows.cc +8 -11
  319. data/src/core/lib/iomgr/socket_windows.h +3 -14
  320. data/src/core/lib/iomgr/tcp_client.h +1 -10
  321. data/src/core/lib/iomgr/tcp_client_posix.cc +94 -78
  322. data/src/core/lib/iomgr/tcp_client_posix.h +36 -8
  323. data/src/core/lib/iomgr/tcp_client_uv.cc +16 -23
  324. data/src/core/lib/iomgr/tcp_client_windows.cc +22 -25
  325. data/src/core/lib/iomgr/tcp_posix.cc +131 -153
  326. data/src/core/lib/iomgr/tcp_posix.h +3 -12
  327. data/src/core/lib/iomgr/tcp_server.h +6 -17
  328. data/src/core/lib/iomgr/tcp_server_posix.cc +31 -35
  329. data/src/core/lib/iomgr/tcp_server_utils_posix.h +0 -8
  330. data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +1 -1
  331. data/src/core/lib/iomgr/tcp_server_uv.cc +23 -34
  332. data/src/core/lib/iomgr/tcp_server_windows.cc +24 -34
  333. data/src/core/lib/iomgr/tcp_uv.cc +42 -56
  334. data/src/core/lib/iomgr/tcp_uv.h +0 -8
  335. data/src/core/lib/iomgr/tcp_windows.cc +43 -50
  336. data/src/core/lib/iomgr/tcp_windows.h +1 -9
  337. data/src/core/lib/iomgr/time_averaged_stats.h +0 -8
  338. data/src/core/lib/iomgr/timer.h +6 -15
  339. data/src/core/lib/iomgr/timer_generic.cc +22 -27
  340. data/src/core/lib/iomgr/timer_heap.h +0 -8
  341. data/src/core/lib/iomgr/timer_manager.cc +17 -19
  342. data/src/core/lib/iomgr/timer_manager.h +0 -8
  343. data/src/core/lib/iomgr/timer_uv.cc +12 -14
  344. data/src/core/lib/iomgr/udp_server.cc +148 -54
  345. data/src/core/lib/iomgr/udp_server.h +16 -21
  346. data/src/core/lib/iomgr/unix_sockets_posix.h +0 -8
  347. data/src/core/lib/iomgr/wakeup_fd_cv.cc +4 -4
  348. data/src/core/lib/iomgr/wakeup_fd_cv.h +12 -20
  349. data/src/core/lib/iomgr/wakeup_fd_nospecial.cc +1 -1
  350. data/src/core/lib/iomgr/wakeup_fd_pipe.h +0 -8
  351. data/src/core/lib/iomgr/wakeup_fd_posix.h +0 -8
  352. data/src/core/lib/json/json.h +0 -8
  353. data/src/core/lib/json/json_reader.h +0 -8
  354. data/src/core/lib/json/json_writer.h +0 -8
  355. data/src/core/lib/profiling/basic_timers.cc +3 -2
  356. data/src/core/lib/profiling/timers.h +0 -8
  357. data/src/core/lib/security/context/security_context.cc +9 -10
  358. data/src/core/lib/security/context/security_context.h +0 -8
  359. data/src/core/lib/security/credentials/composite/composite_credentials.cc +23 -28
  360. data/src/core/lib/security/credentials/composite/composite_credentials.h +0 -8
  361. data/src/core/lib/security/credentials/credentials.cc +33 -42
  362. data/src/core/lib/security/credentials/credentials.h +24 -43
  363. data/src/core/lib/security/credentials/credentials_metadata.cc +2 -2
  364. data/src/core/lib/security/credentials/fake/fake_credentials.cc +16 -22
  365. data/src/core/lib/security/credentials/fake/fake_credentials.h +0 -8
  366. data/src/core/lib/security/credentials/google_default/credentials_generic.cc +3 -3
  367. data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +28 -34
  368. data/src/core/lib/security/credentials/google_default/google_default_credentials.h +0 -8
  369. data/src/core/lib/security/credentials/iam/iam_credentials.cc +9 -13
  370. data/src/core/lib/security/credentials/jwt/json_token.cc +1 -1
  371. data/src/core/lib/security/credentials/jwt/json_token.h +0 -8
  372. data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +14 -20
  373. data/src/core/lib/security/credentials/jwt/jwt_credentials.h +1 -10
  374. data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +56 -72
  375. data/src/core/lib/security/credentials/jwt/jwt_verifier.h +5 -17
  376. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +47 -55
  377. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +3 -12
  378. data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +23 -28
  379. data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +8 -13
  380. data/src/core/lib/security/credentials/ssl/ssl_credentials.h +0 -8
  381. data/src/core/lib/security/transport/auth_filters.h +0 -8
  382. data/src/core/lib/security/transport/client_auth_filter.cc +45 -54
  383. data/src/core/lib/security/transport/lb_targets_info.cc +2 -2
  384. data/src/core/lib/security/transport/lb_targets_info.h +0 -8
  385. data/src/core/lib/security/transport/secure_endpoint.cc +54 -68
  386. data/src/core/lib/security/transport/secure_endpoint.h +0 -8
  387. data/src/core/lib/security/transport/security_connector.cc +62 -86
  388. data/src/core/lib/security/transport/security_connector.h +22 -39
  389. data/src/core/lib/security/transport/security_handshaker.cc +83 -106
  390. data/src/core/lib/security/transport/security_handshaker.h +1 -10
  391. data/src/core/lib/security/transport/server_auth_filter.cc +31 -38
  392. data/src/core/lib/security/transport/tsi_error.h +0 -8
  393. data/src/core/lib/security/util/json_util.h +0 -8
  394. data/src/core/lib/slice/b64.cc +5 -6
  395. data/src/core/lib/slice/b64.h +3 -12
  396. data/src/core/lib/slice/percent_encoding.h +0 -8
  397. data/src/core/lib/slice/slice.cc +8 -9
  398. data/src/core/lib/slice/slice_buffer.cc +11 -16
  399. data/src/core/lib/slice/slice_hash_table.cc +5 -7
  400. data/src/core/lib/slice/slice_hash_table.h +2 -12
  401. data/src/core/lib/slice/slice_intern.cc +4 -5
  402. data/src/core/lib/slice/slice_internal.h +4 -15
  403. data/src/core/lib/slice/slice_string_helpers.cc +1 -1
  404. data/src/core/lib/slice/slice_string_helpers.h +1 -9
  405. data/src/core/lib/surface/alarm.cc +11 -14
  406. data/src/core/lib/surface/alarm_internal.h +0 -8
  407. data/src/core/lib/surface/byte_buffer.cc +2 -3
  408. data/src/core/lib/surface/byte_buffer_reader.cc +7 -9
  409. data/src/core/lib/surface/call.cc +198 -241
  410. data/src/core/lib/surface/call.h +9 -23
  411. data/src/core/lib/surface/call_details.cc +3 -4
  412. data/src/core/lib/surface/call_log_batch.cc +1 -1
  413. data/src/core/lib/surface/call_test_only.h +0 -8
  414. data/src/core/lib/surface/channel.cc +53 -64
  415. data/src/core/lib/surface/channel.h +12 -23
  416. data/src/core/lib/surface/channel_init.cc +2 -3
  417. data/src/core/lib/surface/channel_init.h +2 -12
  418. data/src/core/lib/surface/channel_ping.cc +7 -9
  419. data/src/core/lib/surface/channel_stack_type.h +0 -8
  420. data/src/core/lib/surface/completion_queue.cc +158 -176
  421. data/src/core/lib/surface/completion_queue.h +9 -20
  422. data/src/core/lib/surface/completion_queue_factory.h +0 -8
  423. data/src/core/lib/surface/event_string.cc +1 -1
  424. data/src/core/lib/surface/event_string.h +0 -8
  425. data/src/core/lib/surface/init.cc +27 -25
  426. data/src/core/lib/surface/init.h +0 -8
  427. data/src/core/lib/surface/init_secure.cc +2 -2
  428. data/src/core/lib/surface/lame_client.cc +30 -33
  429. data/src/core/lib/surface/lame_client.h +0 -8
  430. data/src/core/lib/surface/server.cc +151 -203
  431. data/src/core/lib/surface/server.h +7 -16
  432. data/src/core/lib/surface/validate_metadata.h +0 -8
  433. data/src/core/lib/surface/version.cc +2 -2
  434. data/src/core/lib/transport/bdp_estimator.cc +2 -2
  435. data/src/core/lib/transport/bdp_estimator.h +1 -1
  436. data/src/core/lib/transport/byte_stream.cc +24 -38
  437. data/src/core/lib/transport/byte_stream.h +10 -25
  438. data/src/core/lib/transport/connectivity_state.cc +9 -13
  439. data/src/core/lib/transport/connectivity_state.h +4 -14
  440. data/src/core/lib/transport/error_utils.cc +6 -6
  441. data/src/core/lib/transport/error_utils.h +2 -11
  442. data/src/core/lib/transport/metadata.cc +21 -23
  443. data/src/core/lib/transport/metadata.h +8 -20
  444. data/src/core/lib/transport/metadata_batch.cc +34 -45
  445. data/src/core/lib/transport/metadata_batch.h +18 -32
  446. data/src/core/lib/transport/service_config.cc +11 -15
  447. data/src/core/lib/transport/service_config.h +3 -13
  448. data/src/core/lib/transport/static_metadata.cc +1 -1
  449. data/src/core/lib/transport/static_metadata.h +1 -7
  450. data/src/core/lib/transport/status_conversion.cc +2 -3
  451. data/src/core/lib/transport/status_conversion.h +1 -10
  452. data/src/core/lib/transport/timeout_encoding.cc +1 -1
  453. data/src/core/lib/transport/timeout_encoding.h +1 -9
  454. data/src/core/lib/transport/transport.cc +36 -50
  455. data/src/core/lib/transport/transport.h +28 -30
  456. data/src/core/lib/transport/transport_impl.h +12 -23
  457. data/src/core/lib/transport/transport_op_string.cc +2 -2
  458. data/src/core/plugin_registry/grpc_plugin_registry.cc +34 -34
  459. data/src/core/tsi/fake_transport_security.cc +7 -10
  460. data/src/core/tsi/fake_transport_security.h +0 -8
  461. data/src/core/tsi/gts_transport_security.cc +2 -2
  462. data/src/core/tsi/gts_transport_security.h +0 -8
  463. data/src/core/tsi/ssl_transport_security.cc +3 -0
  464. data/src/core/tsi/ssl_transport_security.h +0 -8
  465. data/src/core/tsi/ssl_types.h +0 -8
  466. data/src/core/tsi/transport_security.h +1 -9
  467. data/src/core/tsi/transport_security_adapter.h +0 -8
  468. data/src/core/tsi/transport_security_grpc.cc +11 -18
  469. data/src/core/tsi/transport_security_grpc.h +9 -21
  470. data/src/core/tsi/transport_security_interface.h +0 -8
  471. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +0 -30
  472. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +2 -48
  473. data/src/ruby/lib/grpc/version.rb +1 -1
  474. data/src/ruby/spec/channel_connection_spec.rb +2 -1
  475. data/src/ruby/spec/client_auth_spec.rb +1 -1
  476. data/src/ruby/spec/client_server_spec.rb +2 -2
  477. data/src/ruby/spec/generic/active_call_spec.rb +1 -1
  478. data/src/ruby/spec/generic/client_stub_spec.rb +4 -4
  479. data/src/ruby/spec/generic/interceptor_registry_spec.rb +1 -1
  480. data/src/ruby/spec/generic/rpc_server_spec.rb +12 -12
  481. data/src/ruby/spec/google_rpc_status_utils_spec.rb +3 -2
  482. data/src/ruby/spec/pb/health/checker_spec.rb +1 -1
  483. data/src/ruby/spec/server_spec.rb +9 -9
  484. data/src/ruby/spec/support/helpers.rb +35 -1
  485. metadata +68 -66
  486. data/include/grpc/impl/codegen/exec_ctx_fwd.h +0 -26
  487. data/include/grpc/support/histogram.h +0 -64
  488. data/src/core/lib/support/histogram.cc +0 -227
@@ -36,7 +36,7 @@
36
36
 
37
37
  int grpc_server_add_secure_http2_port(grpc_server* server, const char* addr,
38
38
  grpc_server_credentials* creds) {
39
- grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
39
+ grpc_core::ExecCtx exec_ctx;
40
40
  grpc_error* err = GRPC_ERROR_NONE;
41
41
  grpc_server_security_connector* sc = nullptr;
42
42
  int port_num = 0;
@@ -52,8 +52,7 @@ int grpc_server_add_secure_http2_port(grpc_server* server, const char* addr,
52
52
  "No credentials specified for secure server port (creds==NULL)");
53
53
  goto done;
54
54
  }
55
- status =
56
- grpc_server_credentials_create_security_connector(&exec_ctx, creds, &sc);
55
+ status = grpc_server_credentials_create_security_connector(creds, &sc);
57
56
  if (status != GRPC_SECURITY_OK) {
58
57
  char* msg;
59
58
  gpr_asprintf(&msg,
@@ -72,12 +71,12 @@ int grpc_server_add_secure_http2_port(grpc_server* server, const char* addr,
72
71
  grpc_channel_args_copy_and_add(grpc_server_get_channel_args(server),
73
72
  args_to_add, GPR_ARRAY_SIZE(args_to_add));
74
73
  // Add server port.
75
- err = grpc_chttp2_server_add_port(&exec_ctx, server, addr, args, &port_num);
74
+ err = grpc_chttp2_server_add_port(server, addr, args, &port_num);
76
75
  done:
77
76
  if (sc != nullptr) {
78
- GRPC_SECURITY_CONNECTOR_UNREF(&exec_ctx, &sc->base, "server");
77
+ GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "server");
79
78
  }
80
- grpc_exec_ctx_finish(&exec_ctx);
79
+
81
80
  if (err != GRPC_ERROR_NONE) {
82
81
  const char* msg = grpc_error_string(err);
83
82
  gpr_log(GPR_ERROR, "%s", msg);
@@ -19,9 +19,9 @@
19
19
  #include "src/core/ext/transport/chttp2/transport/bin_decoder.h"
20
20
  #include <grpc/support/alloc.h>
21
21
  #include <grpc/support/log.h>
22
+ #include "src/core/lib/gpr/string.h"
22
23
  #include "src/core/lib/slice/slice_internal.h"
23
24
  #include "src/core/lib/slice/slice_string_helpers.h"
24
- #include "src/core/lib/support/string.h"
25
25
 
26
26
  static uint8_t decode_table[] = {
27
27
  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
@@ -130,8 +130,7 @@ bool grpc_base64_decode_partial(struct grpc_base64_decode_context* ctx) {
130
130
  return true;
131
131
  }
132
132
 
133
- grpc_slice grpc_chttp2_base64_decode(grpc_exec_ctx* exec_ctx,
134
- grpc_slice input) {
133
+ grpc_slice grpc_chttp2_base64_decode(grpc_slice input) {
135
134
  size_t input_length = GRPC_SLICE_LENGTH(input);
136
135
  size_t output_length = input_length / 4 * 3;
137
136
  struct grpc_base64_decode_context ctx;
@@ -167,7 +166,7 @@ grpc_slice grpc_chttp2_base64_decode(grpc_exec_ctx* exec_ctx,
167
166
  char* s = grpc_slice_to_c_string(input);
168
167
  gpr_log(GPR_ERROR, "Base64 decoding failed, input string:\n%s\n", s);
169
168
  gpr_free(s);
170
- grpc_slice_unref_internal(exec_ctx, output);
169
+ grpc_slice_unref_internal(output);
171
170
  return grpc_empty_slice();
172
171
  }
173
172
  GPR_ASSERT(ctx.output_cur == GRPC_SLICE_END_PTR(output));
@@ -175,8 +174,7 @@ grpc_slice grpc_chttp2_base64_decode(grpc_exec_ctx* exec_ctx,
175
174
  return output;
176
175
  }
177
176
 
178
- grpc_slice grpc_chttp2_base64_decode_with_length(grpc_exec_ctx* exec_ctx,
179
- grpc_slice input,
177
+ grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input,
180
178
  size_t output_length) {
181
179
  size_t input_length = GRPC_SLICE_LENGTH(input);
182
180
  grpc_slice output = GRPC_SLICE_MALLOC(output_length);
@@ -189,7 +187,7 @@ grpc_slice grpc_chttp2_base64_decode_with_length(grpc_exec_ctx* exec_ctx,
189
187
  "grpc_chttp2_base64_decode_with_length has a length of %d, which "
190
188
  "has a tail of 1 byte.\n",
191
189
  (int)input_length);
192
- grpc_slice_unref_internal(exec_ctx, output);
190
+ grpc_slice_unref_internal(output);
193
191
  return grpc_empty_slice();
194
192
  }
195
193
 
@@ -199,7 +197,7 @@ grpc_slice grpc_chttp2_base64_decode_with_length(grpc_exec_ctx* exec_ctx,
199
197
  "than the max possible output length %d.\n",
200
198
  (int)output_length,
201
199
  (int)(input_length / 4 * 3 + tail_xtra[input_length % 4]));
202
- grpc_slice_unref_internal(exec_ctx, output);
200
+ grpc_slice_unref_internal(output);
203
201
  return grpc_empty_slice();
204
202
  }
205
203
 
@@ -213,7 +211,7 @@ grpc_slice grpc_chttp2_base64_decode_with_length(grpc_exec_ctx* exec_ctx,
213
211
  char* s = grpc_slice_to_c_string(input);
214
212
  gpr_log(GPR_ERROR, "Base64 decoding failed, input string:\n%s\n", s);
215
213
  gpr_free(s);
216
- grpc_slice_unref_internal(exec_ctx, output);
214
+ grpc_slice_unref_internal(output);
217
215
  return grpc_empty_slice();
218
216
  }
219
217
  GPR_ASSERT(ctx.output_cur == GRPC_SLICE_END_PTR(output));
@@ -22,10 +22,6 @@
22
22
  #include <grpc/slice.h>
23
23
  #include <stdbool.h>
24
24
 
25
- #ifdef __cplusplus
26
- extern "C" {
27
- #endif
28
-
29
25
  struct grpc_base64_decode_context {
30
26
  /* input/output: */
31
27
  uint8_t* input_cur;
@@ -44,17 +40,12 @@ bool grpc_base64_decode_partial(struct grpc_base64_decode_context* ctx);
44
40
 
45
41
  /* base64 decode a slice with pad chars. Returns a new slice, does not take
46
42
  ownership of the input. Returns an empty slice if decoding is failed. */
47
- grpc_slice grpc_chttp2_base64_decode(grpc_exec_ctx* exec_ctx, grpc_slice input);
43
+ grpc_slice grpc_chttp2_base64_decode(grpc_slice input);
48
44
 
49
45
  /* base64 decode a slice without pad chars, data length is needed. Returns a new
50
46
  slice, does not take ownership of the input. Returns an empty slice if
51
47
  decoding is failed. */
52
- grpc_slice grpc_chttp2_base64_decode_with_length(grpc_exec_ctx* exec_ctx,
53
- grpc_slice input,
48
+ grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input,
54
49
  size_t output_length);
55
50
 
56
- #ifdef __cplusplus
57
- }
58
- #endif
59
-
60
51
  #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H */
@@ -21,10 +21,6 @@
21
21
 
22
22
  #include <grpc/slice.h>
23
23
 
24
- #ifdef __cplusplus
25
- extern "C" {
26
- #endif
27
-
28
24
  /* base64 encode a slice. Returns a new slice, does not take ownership of the
29
25
  input */
30
26
  grpc_slice grpc_chttp2_base64_encode(grpc_slice input);
@@ -36,12 +32,8 @@ grpc_slice grpc_chttp2_huffman_compress(grpc_slice input);
36
32
  /* equivalent to:
37
33
  grpc_slice x = grpc_chttp2_base64_encode(input);
38
34
  grpc_slice y = grpc_chttp2_huffman_compress(x);
39
- grpc_slice_unref_internal(exec_ctx, x);
35
+ grpc_slice_unref_internal( x);
40
36
  return y; */
41
37
  grpc_slice grpc_chttp2_base64_encode_and_huffman_compress(grpc_slice input);
42
38
 
43
- #ifdef __cplusplus
44
- }
45
- #endif
46
-
47
39
  #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H */
@@ -18,8 +18,16 @@
18
18
 
19
19
  #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
20
20
  #include "src/core/lib/debug/trace.h"
21
+ #include "src/core/lib/gpr/env.h"
21
22
  #include "src/core/lib/transport/metadata.h"
22
23
 
23
- extern "C" void grpc_chttp2_plugin_init(void) {}
24
+ void grpc_chttp2_plugin_init(void) {
25
+ g_flow_control_enabled = true;
26
+ char* env_variable = gpr_getenv("GRPC_EXPERIMENTAL_DISABLE_FLOW_CONTROL");
27
+ if (env_variable != nullptr) {
28
+ g_flow_control_enabled = false;
29
+ gpr_free(env_variable);
30
+ }
31
+ }
24
32
 
25
- extern "C" void grpc_chttp2_plugin_shutdown(void) {}
33
+ void grpc_chttp2_plugin_shutdown(void) {}
@@ -38,14 +38,14 @@
38
38
  #include "src/core/lib/channel/channel_args.h"
39
39
  #include "src/core/lib/compression/stream_compression.h"
40
40
  #include "src/core/lib/debug/stats.h"
41
+ #include "src/core/lib/gpr/env.h"
42
+ #include "src/core/lib/gpr/string.h"
41
43
  #include "src/core/lib/http/parser.h"
42
44
  #include "src/core/lib/iomgr/executor.h"
43
45
  #include "src/core/lib/iomgr/timer.h"
44
46
  #include "src/core/lib/profiling/timers.h"
45
47
  #include "src/core/lib/slice/slice_internal.h"
46
48
  #include "src/core/lib/slice/slice_string_helpers.h"
47
- #include "src/core/lib/support/env.h"
48
- #include "src/core/lib/support/string.h"
49
49
  #include "src/core/lib/transport/error_utils.h"
50
50
  #include "src/core/lib/transport/http2_errors.h"
51
51
  #include "src/core/lib/transport/static_metadata.h"
@@ -79,7 +79,9 @@ static int g_default_server_keepalive_time_ms =
79
79
  DEFAULT_SERVER_KEEPALIVE_TIME_MS;
80
80
  static int g_default_server_keepalive_timeout_ms =
81
81
  DEFAULT_SERVER_KEEPALIVE_TIMEOUT_MS;
82
- static bool g_default_keepalive_permit_without_calls =
82
+ static bool g_default_client_keepalive_permit_without_calls =
83
+ DEFAULT_KEEPALIVE_PERMIT_WITHOUT_CALLS;
84
+ static bool g_default_server_keepalive_permit_without_calls =
83
85
  DEFAULT_KEEPALIVE_PERMIT_WITHOUT_CALLS;
84
86
 
85
87
  static int g_default_min_sent_ping_interval_without_data_ms =
@@ -95,105 +97,81 @@ grpc_core::DebugOnlyTraceFlag grpc_trace_chttp2_refcount(false,
95
97
  "chttp2_refcount");
96
98
 
97
99
  /* forward declarations of various callbacks that we'll build closures around */
98
- static void write_action_begin_locked(grpc_exec_ctx* exec_ctx, void* t,
99
- grpc_error* error);
100
- static void write_action(grpc_exec_ctx* exec_ctx, void* t, grpc_error* error);
101
- static void write_action_end_locked(grpc_exec_ctx* exec_ctx, void* t,
102
- grpc_error* error);
100
+ static void write_action_begin_locked(void* t, grpc_error* error);
101
+ static void write_action(void* t, grpc_error* error);
102
+ static void write_action_end_locked(void* t, grpc_error* error);
103
103
 
104
- static void read_action_locked(grpc_exec_ctx* exec_ctx, void* t,
105
- grpc_error* error);
104
+ static void read_action_locked(void* t, grpc_error* error);
106
105
 
107
- static void complete_fetch_locked(grpc_exec_ctx* exec_ctx, void* gs,
108
- grpc_error* error);
106
+ static void complete_fetch_locked(void* gs, grpc_error* error);
109
107
  /** Set a transport level setting, and push it to our peer */
110
- static void queue_setting_update(grpc_exec_ctx* exec_ctx,
111
- grpc_chttp2_transport* t,
108
+ static void queue_setting_update(grpc_chttp2_transport* t,
112
109
  grpc_chttp2_setting_id id, uint32_t value);
113
110
 
114
- static void close_from_api(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
115
- grpc_chttp2_stream* s, grpc_error* error);
111
+ static void close_from_api(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
112
+ grpc_error* error);
116
113
 
117
114
  /** Start new streams that have been created if we can */
118
- static void maybe_start_some_streams(grpc_exec_ctx* exec_ctx,
119
- grpc_chttp2_transport* t);
115
+ static void maybe_start_some_streams(grpc_chttp2_transport* t);
120
116
 
121
- static void connectivity_state_set(grpc_exec_ctx* exec_ctx,
122
- grpc_chttp2_transport* t,
117
+ static void connectivity_state_set(grpc_chttp2_transport* t,
123
118
  grpc_connectivity_state state,
124
119
  grpc_error* error, const char* reason);
125
120
 
126
- static void incoming_byte_stream_destroy_locked(grpc_exec_ctx* exec_ctx,
127
- void* byte_stream,
121
+ static void incoming_byte_stream_destroy_locked(void* byte_stream,
128
122
  grpc_error* error_ignored);
129
123
  static void incoming_byte_stream_publish_error(
130
- grpc_exec_ctx* exec_ctx, grpc_chttp2_incoming_byte_stream* bs,
131
- grpc_error* error);
132
- static void incoming_byte_stream_unref(grpc_exec_ctx* exec_ctx,
133
- grpc_chttp2_incoming_byte_stream* bs);
134
-
135
- static void benign_reclaimer_locked(grpc_exec_ctx* exec_ctx, void* t,
136
- grpc_error* error);
137
- static void destructive_reclaimer_locked(grpc_exec_ctx* exec_ctx, void* t,
138
- grpc_error* error);
139
-
140
- static void post_benign_reclaimer(grpc_exec_ctx* exec_ctx,
141
- grpc_chttp2_transport* t);
142
- static void post_destructive_reclaimer(grpc_exec_ctx* exec_ctx,
143
- grpc_chttp2_transport* t);
144
-
145
- static void close_transport_locked(grpc_exec_ctx* exec_ctx,
146
- grpc_chttp2_transport* t, grpc_error* error);
147
- static void end_all_the_calls(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
148
- grpc_error* error);
149
-
150
- static void schedule_bdp_ping_locked(grpc_exec_ctx* exec_ctx,
151
- grpc_chttp2_transport* t);
152
- static void start_bdp_ping_locked(grpc_exec_ctx* exec_ctx, void* tp,
153
- grpc_error* error);
154
- static void finish_bdp_ping_locked(grpc_exec_ctx* exec_ctx, void* tp,
155
- grpc_error* error);
156
- static void next_bdp_ping_timer_expired_locked(grpc_exec_ctx* exec_ctx,
157
- void* tp, grpc_error* error);
158
-
159
- static void cancel_pings(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
160
- grpc_error* error);
161
- static void send_ping_locked(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
124
+ grpc_chttp2_incoming_byte_stream* bs, grpc_error* error);
125
+ static void incoming_byte_stream_unref(grpc_chttp2_incoming_byte_stream* bs);
126
+
127
+ static void benign_reclaimer_locked(void* t, grpc_error* error);
128
+ static void destructive_reclaimer_locked(void* t, grpc_error* error);
129
+
130
+ static void post_benign_reclaimer(grpc_chttp2_transport* t);
131
+ static void post_destructive_reclaimer(grpc_chttp2_transport* t);
132
+
133
+ static void close_transport_locked(grpc_chttp2_transport* t, grpc_error* error);
134
+ static void end_all_the_calls(grpc_chttp2_transport* t, grpc_error* error);
135
+
136
+ static void schedule_bdp_ping_locked(grpc_chttp2_transport* t);
137
+ static void start_bdp_ping_locked(void* tp, grpc_error* error);
138
+ static void finish_bdp_ping_locked(void* tp, grpc_error* error);
139
+ static void next_bdp_ping_timer_expired_locked(void* tp, grpc_error* error);
140
+
141
+ static void cancel_pings(grpc_chttp2_transport* t, grpc_error* error);
142
+ static void send_ping_locked(grpc_chttp2_transport* t,
162
143
  grpc_closure* on_initiate,
163
144
  grpc_closure* on_complete);
164
- static void retry_initiate_ping_locked(grpc_exec_ctx* exec_ctx, void* tp,
165
- grpc_error* error);
145
+ static void retry_initiate_ping_locked(void* tp, grpc_error* error);
166
146
 
167
147
  /** keepalive-relevant functions */
168
- static void init_keepalive_ping_locked(grpc_exec_ctx* exec_ctx, void* arg,
169
- grpc_error* error);
170
- static void start_keepalive_ping_locked(grpc_exec_ctx* exec_ctx, void* arg,
171
- grpc_error* error);
172
- static void finish_keepalive_ping_locked(grpc_exec_ctx* exec_ctx, void* arg,
173
- grpc_error* error);
174
- static void keepalive_watchdog_fired_locked(grpc_exec_ctx* exec_ctx, void* arg,
175
- grpc_error* error);
176
-
177
- static void reset_byte_stream(grpc_exec_ctx* exec_ctx, void* arg,
178
- grpc_error* error);
148
+ static void init_keepalive_ping_locked(void* arg, grpc_error* error);
149
+ static void start_keepalive_ping_locked(void* arg, grpc_error* error);
150
+ static void finish_keepalive_ping_locked(void* arg, grpc_error* error);
151
+ static void keepalive_watchdog_fired_locked(void* arg, grpc_error* error);
152
+
153
+ static void reset_byte_stream(void* arg, grpc_error* error);
154
+
155
+ // Flow control default enabled. Can be disabled by setting
156
+ // GRPC_EXPERIMENTAL_DISABLE_FLOW_CONTROL
157
+ bool g_flow_control_enabled = true;
179
158
 
180
159
  /*******************************************************************************
181
160
  * CONSTRUCTION/DESTRUCTION/REFCOUNTING
182
161
  */
183
162
 
184
- static void destruct_transport(grpc_exec_ctx* exec_ctx,
185
- grpc_chttp2_transport* t) {
163
+ static void destruct_transport(grpc_chttp2_transport* t) {
186
164
  size_t i;
187
165
 
188
- grpc_endpoint_destroy(exec_ctx, t->ep);
166
+ grpc_endpoint_destroy(t->ep);
189
167
 
190
- grpc_slice_buffer_destroy_internal(exec_ctx, &t->qbuf);
168
+ grpc_slice_buffer_destroy_internal(&t->qbuf);
191
169
 
192
- grpc_slice_buffer_destroy_internal(exec_ctx, &t->outbuf);
193
- grpc_chttp2_hpack_compressor_destroy(exec_ctx, &t->hpack_compressor);
170
+ grpc_slice_buffer_destroy_internal(&t->outbuf);
171
+ grpc_chttp2_hpack_compressor_destroy(&t->hpack_compressor);
194
172
 
195
- grpc_slice_buffer_destroy_internal(exec_ctx, &t->read_buffer);
196
- grpc_chttp2_hpack_parser_destroy(exec_ctx, &t->hpack_parser);
173
+ grpc_slice_buffer_destroy_internal(&t->read_buffer);
174
+ grpc_chttp2_hpack_parser_destroy(&t->hpack_parser);
197
175
  grpc_chttp2_goaway_parser_destroy(&t->goaway_parser);
198
176
 
199
177
  for (i = 0; i < STREAM_LIST_COUNT; i++) {
@@ -206,12 +184,11 @@ static void destruct_transport(grpc_exec_ctx* exec_ctx,
206
184
  GPR_ASSERT(grpc_chttp2_stream_map_size(&t->stream_map) == 0);
207
185
 
208
186
  grpc_chttp2_stream_map_destroy(&t->stream_map);
209
- grpc_connectivity_state_destroy(exec_ctx, &t->channel_callback.state_tracker);
187
+ grpc_connectivity_state_destroy(&t->channel_callback.state_tracker);
210
188
 
211
- GRPC_COMBINER_UNREF(exec_ctx, t->combiner, "chttp2_transport");
189
+ GRPC_COMBINER_UNREF(t->combiner, "chttp2_transport");
212
190
 
213
- cancel_pings(exec_ctx, t,
214
- GRPC_ERROR_CREATE_FROM_STATIC_STRING("Transport destroyed"));
191
+ cancel_pings(t, GRPC_ERROR_CREATE_FROM_STATIC_STRING("Transport destroyed"));
215
192
 
216
193
  while (t->write_cb_pool) {
217
194
  grpc_chttp2_write_cb* next = t->write_cb_pool->next;
@@ -228,8 +205,7 @@ static void destruct_transport(grpc_exec_ctx* exec_ctx,
228
205
  }
229
206
 
230
207
  #ifndef NDEBUG
231
- void grpc_chttp2_unref_transport(grpc_exec_ctx* exec_ctx,
232
- grpc_chttp2_transport* t, const char* reason,
208
+ void grpc_chttp2_unref_transport(grpc_chttp2_transport* t, const char* reason,
233
209
  const char* file, int line) {
234
210
  if (grpc_trace_chttp2_refcount.enabled()) {
235
211
  gpr_atm val = gpr_atm_no_barrier_load(&t->refs.count);
@@ -237,7 +213,7 @@ void grpc_chttp2_unref_transport(grpc_exec_ctx* exec_ctx,
237
213
  t, val, val - 1, reason, file, line);
238
214
  }
239
215
  if (!gpr_unref(&t->refs)) return;
240
- destruct_transport(exec_ctx, t);
216
+ destruct_transport(t);
241
217
  }
242
218
 
243
219
  void grpc_chttp2_ref_transport(grpc_chttp2_transport* t, const char* reason,
@@ -250,10 +226,9 @@ void grpc_chttp2_ref_transport(grpc_chttp2_transport* t, const char* reason,
250
226
  gpr_ref(&t->refs);
251
227
  }
252
228
  #else
253
- void grpc_chttp2_unref_transport(grpc_exec_ctx* exec_ctx,
254
- grpc_chttp2_transport* t) {
229
+ void grpc_chttp2_unref_transport(grpc_chttp2_transport* t) {
255
230
  if (!gpr_unref(&t->refs)) return;
256
- destruct_transport(exec_ctx, t);
231
+ destruct_transport(t);
257
232
  }
258
233
 
259
234
  void grpc_chttp2_ref_transport(grpc_chttp2_transport* t) { gpr_ref(&t->refs); }
@@ -261,7 +236,7 @@ void grpc_chttp2_ref_transport(grpc_chttp2_transport* t) { gpr_ref(&t->refs); }
261
236
 
262
237
  static const grpc_transport_vtable* get_vtable(void);
263
238
 
264
- static void init_transport(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
239
+ static void init_transport(grpc_chttp2_transport* t,
265
240
  const grpc_channel_args* channel_args,
266
241
  grpc_endpoint* ep, bool is_client) {
267
242
  size_t i;
@@ -320,7 +295,7 @@ static void init_transport(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
320
295
 
321
296
  t->goaway_error = GRPC_ERROR_NONE;
322
297
  grpc_chttp2_goaway_parser_init(&t->goaway_parser);
323
- grpc_chttp2_hpack_parser_init(exec_ctx, &t->hpack_parser);
298
+ grpc_chttp2_hpack_parser_init(&t->hpack_parser);
324
299
 
325
300
  grpc_slice_buffer_init(&t->read_buffer);
326
301
 
@@ -351,14 +326,13 @@ static void init_transport(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
351
326
 
352
327
  /* configure http2 the way we like it */
353
328
  if (is_client) {
354
- queue_setting_update(exec_ctx, t, GRPC_CHTTP2_SETTINGS_ENABLE_PUSH, 0);
355
- queue_setting_update(exec_ctx, t,
356
- GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS, 0);
329
+ queue_setting_update(t, GRPC_CHTTP2_SETTINGS_ENABLE_PUSH, 0);
330
+ queue_setting_update(t, GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS, 0);
357
331
  }
358
- queue_setting_update(exec_ctx, t, GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE,
332
+ queue_setting_update(t, GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE,
359
333
  DEFAULT_MAX_HEADER_LIST_SIZE);
360
- queue_setting_update(exec_ctx, t,
361
- GRPC_CHTTP2_SETTINGS_GRPC_ALLOW_TRUE_BINARY_METADATA, 1);
334
+ queue_setting_update(t, GRPC_CHTTP2_SETTINGS_GRPC_ALLOW_TRUE_BINARY_METADATA,
335
+ 1);
362
336
 
363
337
  t->ping_policy.max_pings_without_data = g_default_max_pings_without_data;
364
338
  t->ping_policy.min_sent_ping_interval_without_data =
@@ -375,6 +349,8 @@ static void init_transport(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
375
349
  t->keepalive_timeout = g_default_client_keepalive_timeout_ms == INT_MAX
376
350
  ? GRPC_MILLIS_INF_FUTURE
377
351
  : g_default_client_keepalive_timeout_ms;
352
+ t->keepalive_permit_without_calls =
353
+ g_default_client_keepalive_permit_without_calls;
378
354
  } else {
379
355
  t->keepalive_time = g_default_server_keepalive_time_ms == INT_MAX
380
356
  ? GRPC_MILLIS_INF_FUTURE
@@ -382,8 +358,9 @@ static void init_transport(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
382
358
  t->keepalive_timeout = g_default_server_keepalive_timeout_ms == INT_MAX
383
359
  ? GRPC_MILLIS_INF_FUTURE
384
360
  : g_default_server_keepalive_timeout_ms;
361
+ t->keepalive_permit_without_calls =
362
+ g_default_server_keepalive_permit_without_calls;
385
363
  }
386
- t->keepalive_permit_without_calls = g_default_keepalive_permit_without_calls;
387
364
 
388
365
  t->opt_target = GRPC_CHTTP2_OPTIMIZE_FOR_LATENCY;
389
366
 
@@ -533,7 +510,7 @@ static void init_transport(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
533
510
  int value = grpc_channel_arg_get_integer(
534
511
  &channel_args->args[i], settings_map[j].integer_options);
535
512
  if (value >= 0) {
536
- queue_setting_update(exec_ctx, t, settings_map[j].setting_id,
513
+ queue_setting_update(t, settings_map[j].setting_id,
537
514
  (uint32_t)value);
538
515
  }
539
516
  }
@@ -544,7 +521,13 @@ static void init_transport(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
544
521
  }
545
522
  }
546
523
 
547
- t->flow_control.Init(exec_ctx, t, enable_bdp);
524
+ if (g_flow_control_enabled) {
525
+ t->flow_control.Init<grpc_core::chttp2::TransportFlowControl>(t,
526
+ enable_bdp);
527
+ } else {
528
+ t->flow_control.Init<grpc_core::chttp2::TransportFlowControlDisabled>(t);
529
+ enable_bdp = false;
530
+ }
548
531
 
549
532
  /* No pings allowed before receiving a header or data frame. */
550
533
  t->ping_state.pings_before_data_required = 0;
@@ -558,8 +541,8 @@ static void init_transport(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
558
541
  if (t->keepalive_time != GRPC_MILLIS_INF_FUTURE) {
559
542
  t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_WAITING;
560
543
  GRPC_CHTTP2_REF_TRANSPORT(t, "init keepalive ping");
561
- grpc_timer_init(exec_ctx, &t->keepalive_ping_timer,
562
- grpc_exec_ctx_now(exec_ctx) + t->keepalive_time,
544
+ grpc_timer_init(&t->keepalive_ping_timer,
545
+ grpc_core::ExecCtx::Get()->Now() + t->keepalive_time,
563
546
  &t->init_keepalive_ping_locked);
564
547
  } else {
565
548
  /* Use GRPC_CHTTP2_KEEPALIVE_STATE_DISABLED to indicate there are no
@@ -569,42 +552,37 @@ static void init_transport(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
569
552
 
570
553
  if (enable_bdp) {
571
554
  GRPC_CHTTP2_REF_TRANSPORT(t, "bdp_ping");
572
- schedule_bdp_ping_locked(exec_ctx, t);
555
+ schedule_bdp_ping_locked(t);
573
556
 
574
- grpc_chttp2_act_on_flowctl_action(
575
- exec_ctx, t->flow_control->PeriodicUpdate(exec_ctx), t, nullptr);
557
+ grpc_chttp2_act_on_flowctl_action(t->flow_control->PeriodicUpdate(), t,
558
+ nullptr);
576
559
  }
577
560
 
578
- grpc_chttp2_initiate_write(exec_ctx, t,
579
- GRPC_CHTTP2_INITIATE_WRITE_INITIAL_WRITE);
580
- post_benign_reclaimer(exec_ctx, t);
561
+ grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_INITIAL_WRITE);
562
+ post_benign_reclaimer(t);
581
563
  }
582
564
 
583
- static void destroy_transport_locked(grpc_exec_ctx* exec_ctx, void* tp,
584
- grpc_error* error) {
565
+ static void destroy_transport_locked(void* tp, grpc_error* error) {
585
566
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)tp;
586
567
  t->destroying = 1;
587
568
  close_transport_locked(
588
- exec_ctx, t,
589
- grpc_error_set_int(
590
- GRPC_ERROR_CREATE_FROM_STATIC_STRING("Transport destroyed"),
591
- GRPC_ERROR_INT_OCCURRED_DURING_WRITE, t->write_state));
592
- GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "destroy");
569
+ t, grpc_error_set_int(
570
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("Transport destroyed"),
571
+ GRPC_ERROR_INT_OCCURRED_DURING_WRITE, t->write_state));
572
+ GRPC_CHTTP2_UNREF_TRANSPORT(t, "destroy");
593
573
  }
594
574
 
595
- static void destroy_transport(grpc_exec_ctx* exec_ctx, grpc_transport* gt) {
575
+ static void destroy_transport(grpc_transport* gt) {
596
576
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)gt;
597
- GRPC_CLOSURE_SCHED(exec_ctx,
598
- GRPC_CLOSURE_CREATE(destroy_transport_locked, t,
577
+ GRPC_CLOSURE_SCHED(GRPC_CLOSURE_CREATE(destroy_transport_locked, t,
599
578
  grpc_combiner_scheduler(t->combiner)),
600
579
  GRPC_ERROR_NONE);
601
580
  }
602
581
 
603
- static void close_transport_locked(grpc_exec_ctx* exec_ctx,
604
- grpc_chttp2_transport* t,
582
+ static void close_transport_locked(grpc_chttp2_transport* t,
605
583
  grpc_error* error) {
606
- end_all_the_calls(exec_ctx, t, GRPC_ERROR_REF(error));
607
- cancel_pings(exec_ctx, t, GRPC_ERROR_REF(error));
584
+ end_all_the_calls(t, GRPC_ERROR_REF(error));
585
+ cancel_pings(t, GRPC_ERROR_REF(error));
608
586
  if (t->closed_with_error == GRPC_ERROR_NONE) {
609
587
  if (!grpc_error_has_clear_grpc_status(error)) {
610
588
  error = grpc_error_set_int(error, GRPC_ERROR_INT_GRPC_STATUS,
@@ -622,21 +600,21 @@ static void close_transport_locked(grpc_exec_ctx* exec_ctx,
622
600
  }
623
601
  GPR_ASSERT(error != GRPC_ERROR_NONE);
624
602
  t->closed_with_error = GRPC_ERROR_REF(error);
625
- connectivity_state_set(exec_ctx, t, GRPC_CHANNEL_SHUTDOWN,
626
- GRPC_ERROR_REF(error), "close_transport");
603
+ connectivity_state_set(t, GRPC_CHANNEL_SHUTDOWN, GRPC_ERROR_REF(error),
604
+ "close_transport");
627
605
  if (t->ping_state.is_delayed_ping_timer_set) {
628
- grpc_timer_cancel(exec_ctx, &t->ping_state.delayed_ping_timer);
606
+ grpc_timer_cancel(&t->ping_state.delayed_ping_timer);
629
607
  }
630
608
  if (t->have_next_bdp_ping_timer) {
631
- grpc_timer_cancel(exec_ctx, &t->next_bdp_ping_timer);
609
+ grpc_timer_cancel(&t->next_bdp_ping_timer);
632
610
  }
633
611
  switch (t->keepalive_state) {
634
612
  case GRPC_CHTTP2_KEEPALIVE_STATE_WAITING:
635
- grpc_timer_cancel(exec_ctx, &t->keepalive_ping_timer);
613
+ grpc_timer_cancel(&t->keepalive_ping_timer);
636
614
  break;
637
615
  case GRPC_CHTTP2_KEEPALIVE_STATE_PINGING:
638
- grpc_timer_cancel(exec_ctx, &t->keepalive_ping_timer);
639
- grpc_timer_cancel(exec_ctx, &t->keepalive_watchdog_timer);
616
+ grpc_timer_cancel(&t->keepalive_ping_timer);
617
+ grpc_timer_cancel(&t->keepalive_watchdog_timer);
640
618
  break;
641
619
  case GRPC_CHTTP2_KEEPALIVE_STATE_DYING:
642
620
  case GRPC_CHTTP2_KEEPALIVE_STATE_DISABLED:
@@ -647,14 +625,13 @@ static void close_transport_locked(grpc_exec_ctx* exec_ctx,
647
625
  /* flush writable stream list to avoid dangling references */
648
626
  grpc_chttp2_stream* s;
649
627
  while (grpc_chttp2_list_pop_writable_stream(t, &s)) {
650
- GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:close");
628
+ GRPC_CHTTP2_STREAM_UNREF(s, "chttp2_writing:close");
651
629
  }
652
630
  GPR_ASSERT(t->write_state == GRPC_CHTTP2_WRITE_STATE_IDLE);
653
- grpc_endpoint_shutdown(exec_ctx, t->ep, GRPC_ERROR_REF(error));
631
+ grpc_endpoint_shutdown(t->ep, GRPC_ERROR_REF(error));
654
632
  }
655
633
  if (t->notify_on_receive_settings != nullptr) {
656
- GRPC_CLOSURE_SCHED(exec_ctx, t->notify_on_receive_settings,
657
- GRPC_ERROR_CANCELLED);
634
+ GRPC_CLOSURE_SCHED(t->notify_on_receive_settings, GRPC_ERROR_CANCELLED);
658
635
  t->notify_on_receive_settings = nullptr;
659
636
  }
660
637
  GRPC_ERROR_UNREF(error);
@@ -664,22 +641,21 @@ static void close_transport_locked(grpc_exec_ctx* exec_ctx,
664
641
  void grpc_chttp2_stream_ref(grpc_chttp2_stream* s, const char* reason) {
665
642
  grpc_stream_ref(s->refcount, reason);
666
643
  }
667
- void grpc_chttp2_stream_unref(grpc_exec_ctx* exec_ctx, grpc_chttp2_stream* s,
668
- const char* reason) {
669
- grpc_stream_unref(exec_ctx, s->refcount, reason);
644
+ void grpc_chttp2_stream_unref(grpc_chttp2_stream* s, const char* reason) {
645
+ grpc_stream_unref(s->refcount, reason);
670
646
  }
671
647
  #else
672
648
  void grpc_chttp2_stream_ref(grpc_chttp2_stream* s) {
673
649
  grpc_stream_ref(s->refcount);
674
650
  }
675
- void grpc_chttp2_stream_unref(grpc_exec_ctx* exec_ctx, grpc_chttp2_stream* s) {
676
- grpc_stream_unref(exec_ctx, s->refcount);
651
+ void grpc_chttp2_stream_unref(grpc_chttp2_stream* s) {
652
+ grpc_stream_unref(s->refcount);
677
653
  }
678
654
  #endif
679
655
 
680
- static int init_stream(grpc_exec_ctx* exec_ctx, grpc_transport* gt,
681
- grpc_stream* gs, grpc_stream_refcount* refcount,
682
- const void* server_data, gpr_arena* arena) {
656
+ static int init_stream(grpc_transport* gt, grpc_stream* gs,
657
+ grpc_stream_refcount* refcount, const void* server_data,
658
+ gpr_arena* arena) {
683
659
  GPR_TIMER_BEGIN("init_stream", 0);
684
660
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)gt;
685
661
  grpc_chttp2_stream* s = (grpc_chttp2_stream*)gs;
@@ -713,17 +689,23 @@ static int init_stream(grpc_exec_ctx* exec_ctx, grpc_transport* gt,
713
689
  s->id = (uint32_t)(uintptr_t)server_data;
714
690
  *t->accepting_stream = s;
715
691
  grpc_chttp2_stream_map_add(&t->stream_map, s->id, s);
716
- post_destructive_reclaimer(exec_ctx, t);
692
+ post_destructive_reclaimer(t);
717
693
  }
718
694
 
719
- s->flow_control.Init(t->flow_control.get(), s);
695
+ if (t->flow_control->flow_control_enabled()) {
696
+ s->flow_control.Init<grpc_core::chttp2::StreamFlowControl>(
697
+ static_cast<grpc_core::chttp2::TransportFlowControl*>(
698
+ t->flow_control.get()),
699
+ s);
700
+ } else {
701
+ s->flow_control.Init<grpc_core::chttp2::StreamFlowControlDisabled>();
702
+ }
720
703
  GPR_TIMER_END("init_stream", 0);
721
704
 
722
705
  return 0;
723
706
  }
724
707
 
725
- static void destroy_stream_locked(grpc_exec_ctx* exec_ctx, void* sp,
726
- grpc_error* error) {
708
+ static void destroy_stream_locked(void* sp, grpc_error* error) {
727
709
  grpc_chttp2_stream* s = (grpc_chttp2_stream*)sp;
728
710
  grpc_chttp2_transport* t = s->t;
729
711
 
@@ -734,11 +716,10 @@ static void destroy_stream_locked(grpc_exec_ctx* exec_ctx, void* sp,
734
716
  GPR_ASSERT(grpc_chttp2_stream_map_find(&t->stream_map, s->id) == nullptr);
735
717
  }
736
718
 
737
- grpc_slice_buffer_destroy_internal(exec_ctx,
738
- &s->unprocessed_incoming_frames_buffer);
739
- grpc_slice_buffer_destroy_internal(exec_ctx, &s->frame_storage);
740
- grpc_slice_buffer_destroy_internal(exec_ctx, &s->compressed_data_buffer);
741
- grpc_slice_buffer_destroy_internal(exec_ctx, &s->decompressed_data_buffer);
719
+ grpc_slice_buffer_destroy_internal(&s->unprocessed_incoming_frames_buffer);
720
+ grpc_slice_buffer_destroy_internal(&s->frame_storage);
721
+ grpc_slice_buffer_destroy_internal(&s->compressed_data_buffer);
722
+ grpc_slice_buffer_destroy_internal(&s->decompressed_data_buffer);
742
723
 
743
724
  grpc_chttp2_list_remove_stalled_by_transport(t, s);
744
725
  grpc_chttp2_list_remove_stalled_by_stream(t, s);
@@ -757,27 +738,24 @@ static void destroy_stream_locked(grpc_exec_ctx* exec_ctx, void* sp,
757
738
  GPR_ASSERT(s->recv_initial_metadata_ready == nullptr);
758
739
  GPR_ASSERT(s->recv_message_ready == nullptr);
759
740
  GPR_ASSERT(s->recv_trailing_metadata_finished == nullptr);
760
- grpc_chttp2_data_parser_destroy(exec_ctx, &s->data_parser);
761
- grpc_chttp2_incoming_metadata_buffer_destroy(exec_ctx,
762
- &s->metadata_buffer[0]);
763
- grpc_chttp2_incoming_metadata_buffer_destroy(exec_ctx,
764
- &s->metadata_buffer[1]);
765
- grpc_slice_buffer_destroy_internal(exec_ctx, &s->flow_controlled_buffer);
741
+ grpc_chttp2_data_parser_destroy(&s->data_parser);
742
+ grpc_chttp2_incoming_metadata_buffer_destroy(&s->metadata_buffer[0]);
743
+ grpc_chttp2_incoming_metadata_buffer_destroy(&s->metadata_buffer[1]);
744
+ grpc_slice_buffer_destroy_internal(&s->flow_controlled_buffer);
766
745
  GRPC_ERROR_UNREF(s->read_closed_error);
767
746
  GRPC_ERROR_UNREF(s->write_closed_error);
768
747
  GRPC_ERROR_UNREF(s->byte_stream_error);
769
748
 
770
749
  s->flow_control.Destroy();
771
750
 
772
- GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "stream");
751
+ GRPC_CHTTP2_UNREF_TRANSPORT(t, "stream");
773
752
 
774
753
  GPR_TIMER_END("destroy_stream", 0);
775
754
 
776
- GRPC_CLOSURE_SCHED(exec_ctx, s->destroy_stream_arg, GRPC_ERROR_NONE);
755
+ GRPC_CLOSURE_SCHED(s->destroy_stream_arg, GRPC_ERROR_NONE);
777
756
  }
778
757
 
779
- static void destroy_stream(grpc_exec_ctx* exec_ctx, grpc_transport* gt,
780
- grpc_stream* gs,
758
+ static void destroy_stream(grpc_transport* gt, grpc_stream* gs,
781
759
  grpc_closure* then_schedule_closure) {
782
760
  GPR_TIMER_BEGIN("destroy_stream", 0);
783
761
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)gt;
@@ -794,7 +772,6 @@ static void destroy_stream(grpc_exec_ctx* exec_ctx, grpc_transport* gt,
794
772
 
795
773
  s->destroy_stream_arg = then_schedule_closure;
796
774
  GRPC_CLOSURE_SCHED(
797
- exec_ctx,
798
775
  GRPC_CLOSURE_INIT(&s->destroy_stream, destroy_stream_locked, s,
799
776
  grpc_combiner_scheduler(t->combiner)),
800
777
  GRPC_ERROR_NONE);
@@ -806,8 +783,7 @@ grpc_chttp2_stream* grpc_chttp2_parsing_lookup_stream(grpc_chttp2_transport* t,
806
783
  return (grpc_chttp2_stream*)grpc_chttp2_stream_map_find(&t->stream_map, id);
807
784
  }
808
785
 
809
- grpc_chttp2_stream* grpc_chttp2_parsing_accept_stream(grpc_exec_ctx* exec_ctx,
810
- grpc_chttp2_transport* t,
786
+ grpc_chttp2_stream* grpc_chttp2_parsing_accept_stream(grpc_chttp2_transport* t,
811
787
  uint32_t id) {
812
788
  if (t->channel_callback.accept_stream == nullptr) {
813
789
  return nullptr;
@@ -815,8 +791,7 @@ grpc_chttp2_stream* grpc_chttp2_parsing_accept_stream(grpc_exec_ctx* exec_ctx,
815
791
  grpc_chttp2_stream* accepting;
816
792
  GPR_ASSERT(t->accepting_stream == nullptr);
817
793
  t->accepting_stream = &accepting;
818
- t->channel_callback.accept_stream(exec_ctx,
819
- t->channel_callback.accept_stream_user_data,
794
+ t->channel_callback.accept_stream(t->channel_callback.accept_stream_user_data,
820
795
  &t->base, (void*)(uintptr_t)id);
821
796
  t->accepting_stream = nullptr;
822
797
  return accepting;
@@ -838,7 +813,7 @@ static const char* write_state_name(grpc_chttp2_write_state st) {
838
813
  GPR_UNREACHABLE_CODE(return "UNKNOWN");
839
814
  }
840
815
 
841
- static void set_write_state(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
816
+ static void set_write_state(grpc_chttp2_transport* t,
842
817
  grpc_chttp2_write_state st, const char* reason) {
843
818
  GRPC_CHTTP2_IF_TRACING(gpr_log(GPR_DEBUG, "W:%p %s state %s -> %s [%s]", t,
844
819
  t->is_client ? "CLIENT" : "SERVER",
@@ -846,108 +821,100 @@ static void set_write_state(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
846
821
  write_state_name(st), reason));
847
822
  t->write_state = st;
848
823
  if (st == GRPC_CHTTP2_WRITE_STATE_IDLE) {
849
- GRPC_CLOSURE_LIST_SCHED(exec_ctx, &t->run_after_write);
824
+ GRPC_CLOSURE_LIST_SCHED(&t->run_after_write);
850
825
  if (t->close_transport_on_writes_finished != nullptr) {
851
826
  grpc_error* err = t->close_transport_on_writes_finished;
852
827
  t->close_transport_on_writes_finished = nullptr;
853
- close_transport_locked(exec_ctx, t, err);
828
+ close_transport_locked(t, err);
854
829
  }
855
830
  }
856
831
  }
857
832
 
858
833
  static void inc_initiate_write_reason(
859
- grpc_exec_ctx* exec_ctx, grpc_chttp2_initiate_write_reason reason) {
834
+ grpc_chttp2_initiate_write_reason reason) {
860
835
  switch (reason) {
861
836
  case GRPC_CHTTP2_INITIATE_WRITE_INITIAL_WRITE:
862
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_INITIAL_WRITE(exec_ctx);
837
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_INITIAL_WRITE();
863
838
  break;
864
839
  case GRPC_CHTTP2_INITIATE_WRITE_START_NEW_STREAM:
865
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_START_NEW_STREAM(exec_ctx);
840
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_START_NEW_STREAM();
866
841
  break;
867
842
  case GRPC_CHTTP2_INITIATE_WRITE_SEND_MESSAGE:
868
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_MESSAGE(exec_ctx);
843
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_MESSAGE();
869
844
  break;
870
845
  case GRPC_CHTTP2_INITIATE_WRITE_SEND_INITIAL_METADATA:
871
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_INITIAL_METADATA(
872
- exec_ctx);
846
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_INITIAL_METADATA();
873
847
  break;
874
848
  case GRPC_CHTTP2_INITIATE_WRITE_SEND_TRAILING_METADATA:
875
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_TRAILING_METADATA(
876
- exec_ctx);
849
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_TRAILING_METADATA();
877
850
  break;
878
851
  case GRPC_CHTTP2_INITIATE_WRITE_RETRY_SEND_PING:
879
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RETRY_SEND_PING(exec_ctx);
852
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RETRY_SEND_PING();
880
853
  break;
881
854
  case GRPC_CHTTP2_INITIATE_WRITE_CONTINUE_PINGS:
882
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CONTINUE_PINGS(exec_ctx);
855
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CONTINUE_PINGS();
883
856
  break;
884
857
  case GRPC_CHTTP2_INITIATE_WRITE_GOAWAY_SENT:
885
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_GOAWAY_SENT(exec_ctx);
858
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_GOAWAY_SENT();
886
859
  break;
887
860
  case GRPC_CHTTP2_INITIATE_WRITE_RST_STREAM:
888
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RST_STREAM(exec_ctx);
861
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RST_STREAM();
889
862
  break;
890
863
  case GRPC_CHTTP2_INITIATE_WRITE_CLOSE_FROM_API:
891
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CLOSE_FROM_API(exec_ctx);
864
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CLOSE_FROM_API();
892
865
  break;
893
866
  case GRPC_CHTTP2_INITIATE_WRITE_STREAM_FLOW_CONTROL:
894
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_STREAM_FLOW_CONTROL(exec_ctx);
867
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_STREAM_FLOW_CONTROL();
895
868
  break;
896
869
  case GRPC_CHTTP2_INITIATE_WRITE_TRANSPORT_FLOW_CONTROL:
897
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL(
898
- exec_ctx);
870
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL();
899
871
  break;
900
872
  case GRPC_CHTTP2_INITIATE_WRITE_SEND_SETTINGS:
901
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_SETTINGS(exec_ctx);
873
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_SETTINGS();
902
874
  break;
903
875
  case GRPC_CHTTP2_INITIATE_WRITE_FLOW_CONTROL_UNSTALLED_BY_SETTING:
904
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_SETTING(
905
- exec_ctx);
876
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_SETTING();
906
877
  break;
907
878
  case GRPC_CHTTP2_INITIATE_WRITE_FLOW_CONTROL_UNSTALLED_BY_UPDATE:
908
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_UPDATE(
909
- exec_ctx);
879
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_UPDATE();
910
880
  break;
911
881
  case GRPC_CHTTP2_INITIATE_WRITE_APPLICATION_PING:
912
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_APPLICATION_PING(exec_ctx);
882
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_APPLICATION_PING();
913
883
  break;
914
884
  case GRPC_CHTTP2_INITIATE_WRITE_KEEPALIVE_PING:
915
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_KEEPALIVE_PING(exec_ctx);
885
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_KEEPALIVE_PING();
916
886
  break;
917
887
  case GRPC_CHTTP2_INITIATE_WRITE_TRANSPORT_FLOW_CONTROL_UNSTALLED:
918
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED(
919
- exec_ctx);
888
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED();
920
889
  break;
921
890
  case GRPC_CHTTP2_INITIATE_WRITE_PING_RESPONSE:
922
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE(exec_ctx);
891
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE();
923
892
  break;
924
893
  case GRPC_CHTTP2_INITIATE_WRITE_FORCE_RST_STREAM:
925
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM(exec_ctx);
894
+ GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM();
926
895
  break;
927
896
  }
928
897
  }
929
898
 
930
- void grpc_chttp2_initiate_write(grpc_exec_ctx* exec_ctx,
931
- grpc_chttp2_transport* t,
899
+ void grpc_chttp2_initiate_write(grpc_chttp2_transport* t,
932
900
  grpc_chttp2_initiate_write_reason reason) {
933
901
  GPR_TIMER_BEGIN("grpc_chttp2_initiate_write", 0);
934
902
 
935
903
  switch (t->write_state) {
936
904
  case GRPC_CHTTP2_WRITE_STATE_IDLE:
937
- inc_initiate_write_reason(exec_ctx, reason);
938
- set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_WRITING,
905
+ inc_initiate_write_reason(reason);
906
+ set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING,
939
907
  grpc_chttp2_initiate_write_reason_string(reason));
940
908
  t->is_first_write_in_batch = true;
941
909
  GRPC_CHTTP2_REF_TRANSPORT(t, "writing");
942
910
  GRPC_CLOSURE_SCHED(
943
- exec_ctx,
944
911
  GRPC_CLOSURE_INIT(&t->write_action_begin_locked,
945
912
  write_action_begin_locked, t,
946
913
  grpc_combiner_finally_scheduler(t->combiner)),
947
914
  GRPC_ERROR_NONE);
948
915
  break;
949
916
  case GRPC_CHTTP2_WRITE_STATE_WRITING:
950
- set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE,
917
+ set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE,
951
918
  grpc_chttp2_initiate_write_reason_string(reason));
952
919
  break;
953
920
  case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE:
@@ -956,8 +923,7 @@ void grpc_chttp2_initiate_write(grpc_exec_ctx* exec_ctx,
956
923
  GPR_TIMER_END("grpc_chttp2_initiate_write", 0);
957
924
  }
958
925
 
959
- void grpc_chttp2_mark_stream_writable(grpc_exec_ctx* exec_ctx,
960
- grpc_chttp2_transport* t,
926
+ void grpc_chttp2_mark_stream_writable(grpc_chttp2_transport* t,
961
927
  grpc_chttp2_stream* s) {
962
928
  if (t->closed_with_error == GRPC_ERROR_NONE &&
963
929
  grpc_chttp2_list_add_writable_stream(t, s)) {
@@ -1007,8 +973,7 @@ static const char* begin_writing_desc(bool partial, bool inlined) {
1007
973
  GPR_UNREACHABLE_CODE(return "bad state tuple");
1008
974
  }
1009
975
 
1010
- static void write_action_begin_locked(grpc_exec_ctx* exec_ctx, void* gt,
1011
- grpc_error* error_ignored) {
976
+ static void write_action_begin_locked(void* gt, grpc_error* error_ignored) {
1012
977
  GPR_TIMER_BEGIN("write_action_begin_locked", 0);
1013
978
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)gt;
1014
979
  GPR_ASSERT(t->write_state != GRPC_CHTTP2_WRITE_STATE_IDLE);
@@ -1016,62 +981,59 @@ static void write_action_begin_locked(grpc_exec_ctx* exec_ctx, void* gt,
1016
981
  if (t->closed_with_error != GRPC_ERROR_NONE) {
1017
982
  r.writing = false;
1018
983
  } else {
1019
- r = grpc_chttp2_begin_write(exec_ctx, t);
984
+ r = grpc_chttp2_begin_write(t);
1020
985
  }
1021
986
  if (r.writing) {
1022
987
  if (r.partial) {
1023
- GRPC_STATS_INC_HTTP2_PARTIAL_WRITES(exec_ctx);
988
+ GRPC_STATS_INC_HTTP2_PARTIAL_WRITES();
1024
989
  }
1025
990
  if (!t->is_first_write_in_batch) {
1026
- GRPC_STATS_INC_HTTP2_WRITES_CONTINUED(exec_ctx);
991
+ GRPC_STATS_INC_HTTP2_WRITES_CONTINUED();
1027
992
  }
1028
993
  grpc_closure_scheduler* scheduler =
1029
994
  write_scheduler(t, r.early_results_scheduled, r.partial);
1030
995
  if (scheduler != grpc_schedule_on_exec_ctx) {
1031
- GRPC_STATS_INC_HTTP2_WRITES_OFFLOADED(exec_ctx);
996
+ GRPC_STATS_INC_HTTP2_WRITES_OFFLOADED();
1032
997
  }
1033
998
  set_write_state(
1034
- exec_ctx, t,
999
+ t,
1035
1000
  r.partial ? GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE
1036
1001
  : GRPC_CHTTP2_WRITE_STATE_WRITING,
1037
1002
  begin_writing_desc(r.partial, scheduler == grpc_schedule_on_exec_ctx));
1038
1003
  GRPC_CLOSURE_SCHED(
1039
- exec_ctx,
1040
1004
  GRPC_CLOSURE_INIT(&t->write_action, write_action, t, scheduler),
1041
1005
  GRPC_ERROR_NONE);
1042
1006
  } else {
1043
- GRPC_STATS_INC_HTTP2_SPURIOUS_WRITES_BEGUN(exec_ctx);
1044
- set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_IDLE,
1045
- "begin writing nothing");
1046
- GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "writing");
1007
+ GRPC_STATS_INC_HTTP2_SPURIOUS_WRITES_BEGUN();
1008
+ set_write_state(t, GRPC_CHTTP2_WRITE_STATE_IDLE, "begin writing nothing");
1009
+ GRPC_CHTTP2_UNREF_TRANSPORT(t, "writing");
1047
1010
  }
1048
1011
  GPR_TIMER_END("write_action_begin_locked", 0);
1049
1012
  }
1050
1013
 
1051
- static void write_action(grpc_exec_ctx* exec_ctx, void* gt, grpc_error* error) {
1014
+ static void write_action(void* gt, grpc_error* error) {
1052
1015
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)gt;
1053
1016
  GPR_TIMER_BEGIN("write_action", 0);
1054
1017
  grpc_endpoint_write(
1055
- exec_ctx, t->ep, &t->outbuf,
1018
+ t->ep, &t->outbuf,
1056
1019
  GRPC_CLOSURE_INIT(&t->write_action_end_locked, write_action_end_locked, t,
1057
1020
  grpc_combiner_scheduler(t->combiner)));
1058
1021
  GPR_TIMER_END("write_action", 0);
1059
1022
  }
1060
1023
 
1061
- static void write_action_end_locked(grpc_exec_ctx* exec_ctx, void* tp,
1062
- grpc_error* error) {
1024
+ static void write_action_end_locked(void* tp, grpc_error* error) {
1063
1025
  GPR_TIMER_BEGIN("terminate_writing_with_lock", 0);
1064
1026
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)tp;
1065
1027
 
1066
1028
  if (error != GRPC_ERROR_NONE) {
1067
- close_transport_locked(exec_ctx, t, GRPC_ERROR_REF(error));
1029
+ close_transport_locked(t, GRPC_ERROR_REF(error));
1068
1030
  }
1069
1031
 
1070
1032
  if (t->sent_goaway_state == GRPC_CHTTP2_GOAWAY_SEND_SCHEDULED) {
1071
1033
  t->sent_goaway_state = GRPC_CHTTP2_GOAWAY_SENT;
1072
1034
  if (grpc_chttp2_stream_map_size(&t->stream_map) == 0) {
1073
1035
  close_transport_locked(
1074
- exec_ctx, t, GRPC_ERROR_CREATE_FROM_STATIC_STRING("goaway sent"));
1036
+ t, GRPC_ERROR_CREATE_FROM_STATIC_STRING("goaway sent"));
1075
1037
  }
1076
1038
  }
1077
1039
 
@@ -1080,17 +1042,14 @@ static void write_action_end_locked(grpc_exec_ctx* exec_ctx, void* tp,
1080
1042
  GPR_UNREACHABLE_CODE(break);
1081
1043
  case GRPC_CHTTP2_WRITE_STATE_WRITING:
1082
1044
  GPR_TIMER_MARK("state=writing", 0);
1083
- set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_IDLE,
1084
- "finish writing");
1045
+ set_write_state(t, GRPC_CHTTP2_WRITE_STATE_IDLE, "finish writing");
1085
1046
  break;
1086
1047
  case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE:
1087
1048
  GPR_TIMER_MARK("state=writing_stale_no_poller", 0);
1088
- set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_WRITING,
1089
- "continue writing");
1049
+ set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING, "continue writing");
1090
1050
  t->is_first_write_in_batch = false;
1091
1051
  GRPC_CHTTP2_REF_TRANSPORT(t, "writing");
1092
1052
  GRPC_CLOSURE_RUN(
1093
- exec_ctx,
1094
1053
  GRPC_CLOSURE_INIT(&t->write_action_begin_locked,
1095
1054
  write_action_begin_locked, t,
1096
1055
  grpc_combiner_finally_scheduler(t->combiner)),
@@ -1098,16 +1057,15 @@ static void write_action_end_locked(grpc_exec_ctx* exec_ctx, void* tp,
1098
1057
  break;
1099
1058
  }
1100
1059
 
1101
- grpc_chttp2_end_write(exec_ctx, t, GRPC_ERROR_REF(error));
1060
+ grpc_chttp2_end_write(t, GRPC_ERROR_REF(error));
1102
1061
 
1103
- GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "writing");
1062
+ GRPC_CHTTP2_UNREF_TRANSPORT(t, "writing");
1104
1063
  GPR_TIMER_END("terminate_writing_with_lock", 0);
1105
1064
  }
1106
1065
 
1107
1066
  // Dirties an HTTP2 setting to be sent out next time a writing path occurs.
1108
1067
  // If the change needs to occur immediately, manually initiate a write.
1109
- static void queue_setting_update(grpc_exec_ctx* exec_ctx,
1110
- grpc_chttp2_transport* t,
1068
+ static void queue_setting_update(grpc_chttp2_transport* t,
1111
1069
  grpc_chttp2_setting_id id, uint32_t value) {
1112
1070
  const grpc_chttp2_setting_parameters* sp =
1113
1071
  &grpc_chttp2_settings_parameters[id];
@@ -1122,8 +1080,7 @@ static void queue_setting_update(grpc_exec_ctx* exec_ctx,
1122
1080
  }
1123
1081
  }
1124
1082
 
1125
- void grpc_chttp2_add_incoming_goaway(grpc_exec_ctx* exec_ctx,
1126
- grpc_chttp2_transport* t,
1083
+ void grpc_chttp2_add_incoming_goaway(grpc_chttp2_transport* t,
1127
1084
  uint32_t goaway_error,
1128
1085
  grpc_slice goaway_text) {
1129
1086
  // GRPC_CHTTP2_IF_TRACING(
@@ -1158,12 +1115,11 @@ void grpc_chttp2_add_incoming_goaway(grpc_exec_ctx* exec_ctx,
1158
1115
 
1159
1116
  /* lie: use transient failure from the transport to indicate goaway has been
1160
1117
  * received */
1161
- connectivity_state_set(exec_ctx, t, GRPC_CHANNEL_TRANSIENT_FAILURE,
1118
+ connectivity_state_set(t, GRPC_CHANNEL_TRANSIENT_FAILURE,
1162
1119
  GRPC_ERROR_REF(t->goaway_error), "got_goaway");
1163
1120
  }
1164
1121
 
1165
- static void maybe_start_some_streams(grpc_exec_ctx* exec_ctx,
1166
- grpc_chttp2_transport* t) {
1122
+ static void maybe_start_some_streams(grpc_chttp2_transport* t) {
1167
1123
  grpc_chttp2_stream* s;
1168
1124
  /* start streams where we have free grpc_chttp2_stream ids and free
1169
1125
  * concurrency */
@@ -1183,22 +1139,21 @@ static void maybe_start_some_streams(grpc_exec_ctx* exec_ctx,
1183
1139
 
1184
1140
  if (t->next_stream_id >= MAX_CLIENT_STREAM_ID) {
1185
1141
  connectivity_state_set(
1186
- exec_ctx, t, GRPC_CHANNEL_TRANSIENT_FAILURE,
1142
+ t, GRPC_CHANNEL_TRANSIENT_FAILURE,
1187
1143
  GRPC_ERROR_CREATE_FROM_STATIC_STRING("Stream IDs exhausted"),
1188
1144
  "no_more_stream_ids");
1189
1145
  }
1190
1146
 
1191
1147
  grpc_chttp2_stream_map_add(&t->stream_map, s->id, s);
1192
- post_destructive_reclaimer(exec_ctx, t);
1193
- grpc_chttp2_mark_stream_writable(exec_ctx, t, s);
1194
- grpc_chttp2_initiate_write(exec_ctx, t,
1195
- GRPC_CHTTP2_INITIATE_WRITE_START_NEW_STREAM);
1148
+ post_destructive_reclaimer(t);
1149
+ grpc_chttp2_mark_stream_writable(t, s);
1150
+ grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_START_NEW_STREAM);
1196
1151
  }
1197
1152
  /* cancel out streams that will never be started */
1198
1153
  while (t->next_stream_id >= MAX_CLIENT_STREAM_ID &&
1199
1154
  grpc_chttp2_list_pop_waiting_for_concurrency(t, &s)) {
1200
1155
  grpc_chttp2_cancel_stream(
1201
- exec_ctx, t, s,
1156
+ t, s,
1202
1157
  grpc_error_set_int(
1203
1158
  GRPC_ERROR_CREATE_FROM_STATIC_STRING("Stream IDs exhausted"),
1204
1159
  GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE));
@@ -1220,15 +1175,13 @@ static grpc_closure* add_closure_barrier(grpc_closure* closure) {
1220
1175
  return closure;
1221
1176
  }
1222
1177
 
1223
- static void null_then_run_closure(grpc_exec_ctx* exec_ctx,
1224
- grpc_closure** closure, grpc_error* error) {
1178
+ static void null_then_run_closure(grpc_closure** closure, grpc_error* error) {
1225
1179
  grpc_closure* c = *closure;
1226
1180
  *closure = nullptr;
1227
- GRPC_CLOSURE_RUN(exec_ctx, c, error);
1181
+ GRPC_CLOSURE_RUN(c, error);
1228
1182
  }
1229
1183
 
1230
- void grpc_chttp2_complete_closure_step(grpc_exec_ctx* exec_ctx,
1231
- grpc_chttp2_transport* t,
1184
+ void grpc_chttp2_complete_closure_step(grpc_chttp2_transport* t,
1232
1185
  grpc_chttp2_stream* s,
1233
1186
  grpc_closure** pclosure,
1234
1187
  grpc_error* error, const char* desc) {
@@ -1268,7 +1221,7 @@ void grpc_chttp2_complete_closure_step(grpc_exec_ctx* exec_ctx,
1268
1221
  }
1269
1222
  if ((t->write_state == GRPC_CHTTP2_WRITE_STATE_IDLE) ||
1270
1223
  !(closure->next_data.scratch & CLOSURE_BARRIER_MAY_COVER_WRITE)) {
1271
- GRPC_CLOSURE_RUN(exec_ctx, closure, closure->error_data.error);
1224
+ GRPC_CLOSURE_RUN(closure, closure->error_data.error);
1272
1225
  } else {
1273
1226
  grpc_closure_list_append(&t->run_after_write, closure,
1274
1227
  closure->error_data.error);
@@ -1284,28 +1237,24 @@ static bool contains_non_ok_status(grpc_metadata_batch* batch) {
1284
1237
  return false;
1285
1238
  }
1286
1239
 
1287
- static void maybe_become_writable_due_to_send_msg(grpc_exec_ctx* exec_ctx,
1288
- grpc_chttp2_transport* t,
1240
+ static void maybe_become_writable_due_to_send_msg(grpc_chttp2_transport* t,
1289
1241
  grpc_chttp2_stream* s) {
1290
1242
  if (s->id != 0 && (!s->write_buffering ||
1291
1243
  s->flow_controlled_buffer.length > t->write_buffer_size)) {
1292
- grpc_chttp2_mark_stream_writable(exec_ctx, t, s);
1293
- grpc_chttp2_initiate_write(exec_ctx, t,
1294
- GRPC_CHTTP2_INITIATE_WRITE_SEND_MESSAGE);
1244
+ grpc_chttp2_mark_stream_writable(t, s);
1245
+ grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_SEND_MESSAGE);
1295
1246
  }
1296
1247
  }
1297
1248
 
1298
- static void add_fetched_slice_locked(grpc_exec_ctx* exec_ctx,
1299
- grpc_chttp2_transport* t,
1249
+ static void add_fetched_slice_locked(grpc_chttp2_transport* t,
1300
1250
  grpc_chttp2_stream* s) {
1301
1251
  s->fetched_send_message_length +=
1302
1252
  (uint32_t)GRPC_SLICE_LENGTH(s->fetching_slice);
1303
1253
  grpc_slice_buffer_add(&s->flow_controlled_buffer, s->fetching_slice);
1304
- maybe_become_writable_due_to_send_msg(exec_ctx, t, s);
1254
+ maybe_become_writable_due_to_send_msg(t, s);
1305
1255
  }
1306
1256
 
1307
- static void continue_fetching_send_locked(grpc_exec_ctx* exec_ctx,
1308
- grpc_chttp2_transport* t,
1257
+ static void continue_fetching_send_locked(grpc_chttp2_transport* t,
1309
1258
  grpc_chttp2_stream* s) {
1310
1259
  for (;;) {
1311
1260
  if (s->fetching_send_message == nullptr) {
@@ -1314,11 +1263,11 @@ static void continue_fetching_send_locked(grpc_exec_ctx* exec_ctx,
1314
1263
  return; /* early out */
1315
1264
  }
1316
1265
  if (s->fetched_send_message_length == s->fetching_send_message->length) {
1317
- grpc_byte_stream_destroy(exec_ctx, s->fetching_send_message);
1266
+ grpc_byte_stream_destroy(s->fetching_send_message);
1318
1267
  int64_t notify_offset = s->next_message_end_offset;
1319
1268
  if (notify_offset <= s->flow_controlled_bytes_written) {
1320
1269
  grpc_chttp2_complete_closure_step(
1321
- exec_ctx, t, s, &s->fetching_send_message_finished, GRPC_ERROR_NONE,
1270
+ t, s, &s->fetching_send_message_finished, GRPC_ERROR_NONE,
1322
1271
  "fetching_send_message_finished");
1323
1272
  } else {
1324
1273
  grpc_chttp2_write_cb* cb = t->write_cb_pool;
@@ -1339,39 +1288,37 @@ static void continue_fetching_send_locked(grpc_exec_ctx* exec_ctx,
1339
1288
  }
1340
1289
  s->fetching_send_message = nullptr;
1341
1290
  return; /* early out */
1342
- } else if (grpc_byte_stream_next(exec_ctx, s->fetching_send_message,
1343
- UINT32_MAX, &s->complete_fetch_locked)) {
1344
- grpc_error* error = grpc_byte_stream_pull(
1345
- exec_ctx, s->fetching_send_message, &s->fetching_slice);
1291
+ } else if (grpc_byte_stream_next(s->fetching_send_message, UINT32_MAX,
1292
+ &s->complete_fetch_locked)) {
1293
+ grpc_error* error =
1294
+ grpc_byte_stream_pull(s->fetching_send_message, &s->fetching_slice);
1346
1295
  if (error != GRPC_ERROR_NONE) {
1347
- grpc_byte_stream_destroy(exec_ctx, s->fetching_send_message);
1348
- grpc_chttp2_cancel_stream(exec_ctx, t, s, error);
1296
+ grpc_byte_stream_destroy(s->fetching_send_message);
1297
+ grpc_chttp2_cancel_stream(t, s, error);
1349
1298
  } else {
1350
- add_fetched_slice_locked(exec_ctx, t, s);
1299
+ add_fetched_slice_locked(t, s);
1351
1300
  }
1352
1301
  }
1353
1302
  }
1354
1303
  }
1355
1304
 
1356
- static void complete_fetch_locked(grpc_exec_ctx* exec_ctx, void* gs,
1357
- grpc_error* error) {
1305
+ static void complete_fetch_locked(void* gs, grpc_error* error) {
1358
1306
  grpc_chttp2_stream* s = (grpc_chttp2_stream*)gs;
1359
1307
  grpc_chttp2_transport* t = s->t;
1360
1308
  if (error == GRPC_ERROR_NONE) {
1361
- error = grpc_byte_stream_pull(exec_ctx, s->fetching_send_message,
1362
- &s->fetching_slice);
1309
+ error = grpc_byte_stream_pull(s->fetching_send_message, &s->fetching_slice);
1363
1310
  if (error == GRPC_ERROR_NONE) {
1364
- add_fetched_slice_locked(exec_ctx, t, s);
1365
- continue_fetching_send_locked(exec_ctx, t, s);
1311
+ add_fetched_slice_locked(t, s);
1312
+ continue_fetching_send_locked(t, s);
1366
1313
  }
1367
1314
  }
1368
1315
  if (error != GRPC_ERROR_NONE) {
1369
- grpc_byte_stream_destroy(exec_ctx, s->fetching_send_message);
1370
- grpc_chttp2_cancel_stream(exec_ctx, t, s, error);
1316
+ grpc_byte_stream_destroy(s->fetching_send_message);
1317
+ grpc_chttp2_cancel_stream(t, s, error);
1371
1318
  }
1372
1319
  }
1373
1320
 
1374
- static void do_nothing(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) {}
1321
+ static void do_nothing(void* arg, grpc_error* error) {}
1375
1322
 
1376
1323
  static void log_metadata(const grpc_metadata_batch* md_batch, uint32_t id,
1377
1324
  bool is_client, bool is_initial) {
@@ -1386,7 +1333,7 @@ static void log_metadata(const grpc_metadata_batch* md_batch, uint32_t id,
1386
1333
  }
1387
1334
  }
1388
1335
 
1389
- static void perform_stream_op_locked(grpc_exec_ctx* exec_ctx, void* stream_op,
1336
+ static void perform_stream_op_locked(void* stream_op,
1390
1337
  grpc_error* error_ignored) {
1391
1338
  GPR_TIMER_BEGIN("perform_stream_op_locked", 0);
1392
1339
 
@@ -1396,7 +1343,7 @@ static void perform_stream_op_locked(grpc_exec_ctx* exec_ctx, void* stream_op,
1396
1343
  grpc_transport_stream_op_batch_payload* op_payload = op->payload;
1397
1344
  grpc_chttp2_transport* t = s->t;
1398
1345
 
1399
- GRPC_STATS_INC_HTTP2_OP_BATCHES(exec_ctx);
1346
+ GRPC_STATS_INC_HTTP2_OP_BATCHES();
1400
1347
 
1401
1348
  if (grpc_http_trace.enabled()) {
1402
1349
  char* str = grpc_transport_stream_op_batch_string(op);
@@ -1431,13 +1378,12 @@ static void perform_stream_op_locked(grpc_exec_ctx* exec_ctx, void* stream_op,
1431
1378
  }
1432
1379
 
1433
1380
  if (op->cancel_stream) {
1434
- GRPC_STATS_INC_HTTP2_OP_CANCEL(exec_ctx);
1435
- grpc_chttp2_cancel_stream(exec_ctx, t, s,
1436
- op_payload->cancel_stream.cancel_error);
1381
+ GRPC_STATS_INC_HTTP2_OP_CANCEL();
1382
+ grpc_chttp2_cancel_stream(t, s, op_payload->cancel_stream.cancel_error);
1437
1383
  }
1438
1384
 
1439
1385
  if (op->send_initial_metadata) {
1440
- GRPC_STATS_INC_HTTP2_OP_SEND_INITIAL_METADATA(exec_ctx);
1386
+ GRPC_STATS_INC_HTTP2_OP_SEND_INITIAL_METADATA();
1441
1387
  GPR_ASSERT(s->send_initial_metadata_finished == nullptr);
1442
1388
  on_complete->next_data.scratch |= CLOSURE_BARRIER_MAY_COVER_WRITE;
1443
1389
 
@@ -1465,7 +1411,7 @@ static void perform_stream_op_locked(grpc_exec_ctx* exec_ctx, void* stream_op,
1465
1411
  }
1466
1412
  if (metadata_size > metadata_peer_limit) {
1467
1413
  grpc_chttp2_cancel_stream(
1468
- exec_ctx, t, s,
1414
+ t, s,
1469
1415
  grpc_error_set_int(
1470
1416
  grpc_error_set_int(
1471
1417
  grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
@@ -1484,10 +1430,10 @@ static void perform_stream_op_locked(grpc_exec_ctx* exec_ctx, void* stream_op,
1484
1430
  if (t->closed_with_error == GRPC_ERROR_NONE) {
1485
1431
  GPR_ASSERT(s->id == 0);
1486
1432
  grpc_chttp2_list_add_waiting_for_concurrency(t, s);
1487
- maybe_start_some_streams(exec_ctx, t);
1433
+ maybe_start_some_streams(t);
1488
1434
  } else {
1489
1435
  grpc_chttp2_cancel_stream(
1490
- exec_ctx, t, s,
1436
+ t, s,
1491
1437
  grpc_error_set_int(
1492
1438
  GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
1493
1439
  "Transport closed", &t->closed_with_error, 1),
@@ -1495,18 +1441,18 @@ static void perform_stream_op_locked(grpc_exec_ctx* exec_ctx, void* stream_op,
1495
1441
  }
1496
1442
  } else {
1497
1443
  GPR_ASSERT(s->id != 0);
1498
- grpc_chttp2_mark_stream_writable(exec_ctx, t, s);
1444
+ grpc_chttp2_mark_stream_writable(t, s);
1499
1445
  if (!(op->send_message &&
1500
1446
  (op->payload->send_message.send_message->flags &
1501
1447
  GRPC_WRITE_BUFFER_HINT))) {
1502
1448
  grpc_chttp2_initiate_write(
1503
- exec_ctx, t, GRPC_CHTTP2_INITIATE_WRITE_SEND_INITIAL_METADATA);
1449
+ t, GRPC_CHTTP2_INITIATE_WRITE_SEND_INITIAL_METADATA);
1504
1450
  }
1505
1451
  }
1506
1452
  } else {
1507
1453
  s->send_initial_metadata = nullptr;
1508
1454
  grpc_chttp2_complete_closure_step(
1509
- exec_ctx, t, s, &s->send_initial_metadata_finished,
1455
+ t, s, &s->send_initial_metadata_finished,
1510
1456
  GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
1511
1457
  "Attempt to send initial metadata after stream was closed",
1512
1458
  &s->write_closed_error, 1),
@@ -1520,9 +1466,9 @@ static void perform_stream_op_locked(grpc_exec_ctx* exec_ctx, void* stream_op,
1520
1466
  }
1521
1467
 
1522
1468
  if (op->send_message) {
1523
- GRPC_STATS_INC_HTTP2_OP_SEND_MESSAGE(exec_ctx);
1469
+ GRPC_STATS_INC_HTTP2_OP_SEND_MESSAGE();
1524
1470
  GRPC_STATS_INC_HTTP2_SEND_MESSAGE_SIZE(
1525
- exec_ctx, op->payload->send_message.send_message->length);
1471
+ op->payload->send_message.send_message->length);
1526
1472
  on_complete->next_data.scratch |= CLOSURE_BARRIER_MAY_COVER_WRITE;
1527
1473
  s->fetching_send_message_finished = add_closure_barrier(op->on_complete);
1528
1474
  if (s->write_closed) {
@@ -1532,7 +1478,7 @@ static void perform_stream_op_locked(grpc_exec_ctx* exec_ctx, void* stream_op,
1532
1478
  // recv_message failure, breaking out of its loop, and then
1533
1479
  // starting recv_trailing_metadata.
1534
1480
  grpc_chttp2_complete_closure_step(
1535
- exec_ctx, t, s, &s->fetching_send_message_finished,
1481
+ t, s, &s->fetching_send_message_finished,
1536
1482
  t->is_client && s->received_trailing_metadata
1537
1483
  ? GRPC_ERROR_NONE
1538
1484
  : GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
@@ -1561,13 +1507,13 @@ static void perform_stream_op_locked(grpc_exec_ctx* exec_ctx, void* stream_op,
1561
1507
  } else {
1562
1508
  s->write_buffering = false;
1563
1509
  }
1564
- continue_fetching_send_locked(exec_ctx, t, s);
1565
- maybe_become_writable_due_to_send_msg(exec_ctx, t, s);
1510
+ continue_fetching_send_locked(t, s);
1511
+ maybe_become_writable_due_to_send_msg(t, s);
1566
1512
  }
1567
1513
  }
1568
1514
 
1569
1515
  if (op->send_trailing_metadata) {
1570
- GRPC_STATS_INC_HTTP2_OP_SEND_TRAILING_METADATA(exec_ctx);
1516
+ GRPC_STATS_INC_HTTP2_OP_SEND_TRAILING_METADATA();
1571
1517
  GPR_ASSERT(s->send_trailing_metadata_finished == nullptr);
1572
1518
  on_complete->next_data.scratch |= CLOSURE_BARRIER_MAY_COVER_WRITE;
1573
1519
  s->send_trailing_metadata_finished = add_closure_barrier(on_complete);
@@ -1581,7 +1527,7 @@ static void perform_stream_op_locked(grpc_exec_ctx* exec_ctx, void* stream_op,
1581
1527
  [GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE];
1582
1528
  if (metadata_size > metadata_peer_limit) {
1583
1529
  grpc_chttp2_cancel_stream(
1584
- exec_ctx, t, s,
1530
+ t, s,
1585
1531
  grpc_error_set_int(
1586
1532
  grpc_error_set_int(
1587
1533
  grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
@@ -1598,7 +1544,7 @@ static void perform_stream_op_locked(grpc_exec_ctx* exec_ctx, void* stream_op,
1598
1544
  if (s->write_closed) {
1599
1545
  s->send_trailing_metadata = nullptr;
1600
1546
  grpc_chttp2_complete_closure_step(
1601
- exec_ctx, t, s, &s->send_trailing_metadata_finished,
1547
+ t, s, &s->send_trailing_metadata_finished,
1602
1548
  grpc_metadata_batch_is_empty(
1603
1549
  op->payload->send_trailing_metadata.send_trailing_metadata)
1604
1550
  ? GRPC_ERROR_NONE
@@ -1609,15 +1555,15 @@ static void perform_stream_op_locked(grpc_exec_ctx* exec_ctx, void* stream_op,
1609
1555
  } else if (s->id != 0) {
1610
1556
  /* TODO(ctiller): check if there's flow control for any outstanding
1611
1557
  bytes before going writable */
1612
- grpc_chttp2_mark_stream_writable(exec_ctx, t, s);
1558
+ grpc_chttp2_mark_stream_writable(t, s);
1613
1559
  grpc_chttp2_initiate_write(
1614
- exec_ctx, t, GRPC_CHTTP2_INITIATE_WRITE_SEND_TRAILING_METADATA);
1560
+ t, GRPC_CHTTP2_INITIATE_WRITE_SEND_TRAILING_METADATA);
1615
1561
  }
1616
1562
  }
1617
1563
  }
1618
1564
 
1619
1565
  if (op->recv_initial_metadata) {
1620
- GRPC_STATS_INC_HTTP2_OP_RECV_INITIAL_METADATA(exec_ctx);
1566
+ GRPC_STATS_INC_HTTP2_OP_RECV_INITIAL_METADATA();
1621
1567
  GPR_ASSERT(s->recv_initial_metadata_ready == nullptr);
1622
1568
  s->recv_initial_metadata_ready =
1623
1569
  op_payload->recv_initial_metadata.recv_initial_metadata_ready;
@@ -1629,11 +1575,11 @@ static void perform_stream_op_locked(grpc_exec_ctx* exec_ctx, void* stream_op,
1629
1575
  gpr_atm_rel_store(op_payload->recv_initial_metadata.peer_string,
1630
1576
  (gpr_atm)gpr_strdup(t->peer_string));
1631
1577
  }
1632
- grpc_chttp2_maybe_complete_recv_initial_metadata(exec_ctx, t, s);
1578
+ grpc_chttp2_maybe_complete_recv_initial_metadata(t, s);
1633
1579
  }
1634
1580
 
1635
1581
  if (op->recv_message) {
1636
- GRPC_STATS_INC_HTTP2_OP_RECV_MESSAGE(exec_ctx);
1582
+ GRPC_STATS_INC_HTTP2_OP_RECV_MESSAGE();
1637
1583
  size_t already_received;
1638
1584
  GPR_ASSERT(s->recv_message_ready == nullptr);
1639
1585
  GPR_ASSERT(!s->pending_byte_stream);
@@ -1644,32 +1590,30 @@ static void perform_stream_op_locked(grpc_exec_ctx* exec_ctx, void* stream_op,
1644
1590
  already_received = s->frame_storage.length;
1645
1591
  s->flow_control->IncomingByteStreamUpdate(GRPC_HEADER_SIZE_IN_BYTES,
1646
1592
  already_received);
1647
- grpc_chttp2_act_on_flowctl_action(exec_ctx,
1648
- s->flow_control->MakeAction(), t, s);
1593
+ grpc_chttp2_act_on_flowctl_action(s->flow_control->MakeAction(), t, s);
1649
1594
  }
1650
1595
  }
1651
- grpc_chttp2_maybe_complete_recv_message(exec_ctx, t, s);
1596
+ grpc_chttp2_maybe_complete_recv_message(t, s);
1652
1597
  }
1653
1598
 
1654
1599
  if (op->recv_trailing_metadata) {
1655
- GRPC_STATS_INC_HTTP2_OP_RECV_TRAILING_METADATA(exec_ctx);
1600
+ GRPC_STATS_INC_HTTP2_OP_RECV_TRAILING_METADATA();
1656
1601
  GPR_ASSERT(s->recv_trailing_metadata_finished == nullptr);
1657
1602
  s->recv_trailing_metadata_finished = add_closure_barrier(on_complete);
1658
1603
  s->recv_trailing_metadata =
1659
1604
  op_payload->recv_trailing_metadata.recv_trailing_metadata;
1660
1605
  s->final_metadata_requested = true;
1661
- grpc_chttp2_maybe_complete_recv_trailing_metadata(exec_ctx, t, s);
1606
+ grpc_chttp2_maybe_complete_recv_trailing_metadata(t, s);
1662
1607
  }
1663
1608
 
1664
- grpc_chttp2_complete_closure_step(exec_ctx, t, s, &on_complete,
1665
- GRPC_ERROR_NONE, "op->on_complete");
1609
+ grpc_chttp2_complete_closure_step(t, s, &on_complete, GRPC_ERROR_NONE,
1610
+ "op->on_complete");
1666
1611
 
1667
1612
  GPR_TIMER_END("perform_stream_op_locked", 0);
1668
- GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "perform_stream_op");
1613
+ GRPC_CHTTP2_STREAM_UNREF(s, "perform_stream_op");
1669
1614
  }
1670
1615
 
1671
- static void perform_stream_op(grpc_exec_ctx* exec_ctx, grpc_transport* gt,
1672
- grpc_stream* gs,
1616
+ static void perform_stream_op(grpc_transport* gt, grpc_stream* gs,
1673
1617
  grpc_transport_stream_op_batch* op) {
1674
1618
  GPR_TIMER_BEGIN("perform_stream_op", 0);
1675
1619
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)gt;
@@ -1697,32 +1641,29 @@ static void perform_stream_op(grpc_exec_ctx* exec_ctx, grpc_transport* gt,
1697
1641
  op->handler_private.extra_arg = gs;
1698
1642
  GRPC_CHTTP2_STREAM_REF(s, "perform_stream_op");
1699
1643
  GRPC_CLOSURE_SCHED(
1700
- exec_ctx,
1701
1644
  GRPC_CLOSURE_INIT(&op->handler_private.closure, perform_stream_op_locked,
1702
1645
  op, grpc_combiner_scheduler(t->combiner)),
1703
1646
  GRPC_ERROR_NONE);
1704
1647
  GPR_TIMER_END("perform_stream_op", 0);
1705
1648
  }
1706
1649
 
1707
- static void cancel_pings(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
1708
- grpc_error* error) {
1650
+ static void cancel_pings(grpc_chttp2_transport* t, grpc_error* error) {
1709
1651
  /* callback remaining pings: they're not allowed to call into the transpot,
1710
1652
  and maybe they hold resources that need to be freed */
1711
1653
  grpc_chttp2_ping_queue* pq = &t->ping_queue;
1712
1654
  GPR_ASSERT(error != GRPC_ERROR_NONE);
1713
1655
  for (size_t j = 0; j < GRPC_CHTTP2_PCL_COUNT; j++) {
1714
1656
  grpc_closure_list_fail_all(&pq->lists[j], GRPC_ERROR_REF(error));
1715
- GRPC_CLOSURE_LIST_SCHED(exec_ctx, &pq->lists[j]);
1657
+ GRPC_CLOSURE_LIST_SCHED(&pq->lists[j]);
1716
1658
  }
1717
1659
  GRPC_ERROR_UNREF(error);
1718
1660
  }
1719
1661
 
1720
- static void send_ping_locked(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
1662
+ static void send_ping_locked(grpc_chttp2_transport* t,
1721
1663
  grpc_closure* on_initiate, grpc_closure* on_ack) {
1722
1664
  if (t->closed_with_error != GRPC_ERROR_NONE) {
1723
- GRPC_CLOSURE_SCHED(exec_ctx, on_initiate,
1724
- GRPC_ERROR_REF(t->closed_with_error));
1725
- GRPC_CLOSURE_SCHED(exec_ctx, on_ack, GRPC_ERROR_REF(t->closed_with_error));
1665
+ GRPC_CLOSURE_SCHED(on_initiate, GRPC_ERROR_REF(t->closed_with_error));
1666
+ GRPC_CLOSURE_SCHED(on_ack, GRPC_ERROR_REF(t->closed_with_error));
1726
1667
  return;
1727
1668
  }
1728
1669
  grpc_chttp2_ping_queue* pq = &t->ping_queue;
@@ -1732,18 +1673,15 @@ static void send_ping_locked(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
1732
1673
  GRPC_ERROR_NONE);
1733
1674
  }
1734
1675
 
1735
- static void retry_initiate_ping_locked(grpc_exec_ctx* exec_ctx, void* tp,
1736
- grpc_error* error) {
1676
+ static void retry_initiate_ping_locked(void* tp, grpc_error* error) {
1737
1677
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)tp;
1738
1678
  t->ping_state.is_delayed_ping_timer_set = false;
1739
1679
  if (error == GRPC_ERROR_NONE) {
1740
- grpc_chttp2_initiate_write(exec_ctx, t,
1741
- GRPC_CHTTP2_INITIATE_WRITE_RETRY_SEND_PING);
1680
+ grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_RETRY_SEND_PING);
1742
1681
  }
1743
1682
  }
1744
1683
 
1745
- void grpc_chttp2_ack_ping(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
1746
- uint64_t id) {
1684
+ void grpc_chttp2_ack_ping(grpc_chttp2_transport* t, uint64_t id) {
1747
1685
  grpc_chttp2_ping_queue* pq = &t->ping_queue;
1748
1686
  if (pq->inflight_id != id) {
1749
1687
  char* from = grpc_endpoint_get_peer(t->ep);
@@ -1751,54 +1689,48 @@ void grpc_chttp2_ack_ping(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
1751
1689
  gpr_free(from);
1752
1690
  return;
1753
1691
  }
1754
- GRPC_CLOSURE_LIST_SCHED(exec_ctx, &pq->lists[GRPC_CHTTP2_PCL_INFLIGHT]);
1692
+ GRPC_CLOSURE_LIST_SCHED(&pq->lists[GRPC_CHTTP2_PCL_INFLIGHT]);
1755
1693
  if (!grpc_closure_list_empty(pq->lists[GRPC_CHTTP2_PCL_NEXT])) {
1756
- grpc_chttp2_initiate_write(exec_ctx, t,
1757
- GRPC_CHTTP2_INITIATE_WRITE_CONTINUE_PINGS);
1694
+ grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_CONTINUE_PINGS);
1758
1695
  }
1759
1696
  }
1760
1697
 
1761
- static void send_goaway(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
1762
- grpc_error* error) {
1698
+ static void send_goaway(grpc_chttp2_transport* t, grpc_error* error) {
1763
1699
  t->sent_goaway_state = GRPC_CHTTP2_GOAWAY_SEND_SCHEDULED;
1764
1700
  grpc_http2_error_code http_error;
1765
1701
  grpc_slice slice;
1766
- grpc_error_get_status(exec_ctx, error, GRPC_MILLIS_INF_FUTURE, nullptr,
1767
- &slice, &http_error, nullptr);
1702
+ grpc_error_get_status(error, GRPC_MILLIS_INF_FUTURE, nullptr, &slice,
1703
+ &http_error, nullptr);
1768
1704
  grpc_chttp2_goaway_append(t->last_new_stream_id, (uint32_t)http_error,
1769
1705
  grpc_slice_ref_internal(slice), &t->qbuf);
1770
- grpc_chttp2_initiate_write(exec_ctx, t,
1771
- GRPC_CHTTP2_INITIATE_WRITE_GOAWAY_SENT);
1706
+ grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_GOAWAY_SENT);
1772
1707
  GRPC_ERROR_UNREF(error);
1773
1708
  }
1774
1709
 
1775
- void grpc_chttp2_add_ping_strike(grpc_exec_ctx* exec_ctx,
1776
- grpc_chttp2_transport* t) {
1710
+ void grpc_chttp2_add_ping_strike(grpc_chttp2_transport* t) {
1777
1711
  t->ping_recv_state.ping_strikes++;
1778
1712
  if (++t->ping_recv_state.ping_strikes > t->ping_policy.max_ping_strikes &&
1779
1713
  t->ping_policy.max_ping_strikes != 0) {
1780
- send_goaway(exec_ctx, t,
1714
+ send_goaway(t,
1781
1715
  grpc_error_set_int(
1782
1716
  GRPC_ERROR_CREATE_FROM_STATIC_STRING("too_many_pings"),
1783
1717
  GRPC_ERROR_INT_HTTP2_ERROR, GRPC_HTTP2_ENHANCE_YOUR_CALM));
1784
1718
  /*The transport will be closed after the write is done */
1785
1719
  close_transport_locked(
1786
- exec_ctx, t,
1787
- grpc_error_set_int(
1788
- GRPC_ERROR_CREATE_FROM_STATIC_STRING("Too many pings"),
1789
- GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE));
1720
+ t, grpc_error_set_int(
1721
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("Too many pings"),
1722
+ GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE));
1790
1723
  }
1791
1724
  }
1792
1725
 
1793
- static void perform_transport_op_locked(grpc_exec_ctx* exec_ctx,
1794
- void* stream_op,
1726
+ static void perform_transport_op_locked(void* stream_op,
1795
1727
  grpc_error* error_ignored) {
1796
1728
  grpc_transport_op* op = (grpc_transport_op*)stream_op;
1797
1729
  grpc_chttp2_transport* t =
1798
1730
  (grpc_chttp2_transport*)op->handler_private.extra_arg;
1799
1731
 
1800
1732
  if (op->goaway_error) {
1801
- send_goaway(exec_ctx, t, op->goaway_error);
1733
+ send_goaway(t, op->goaway_error);
1802
1734
  }
1803
1735
 
1804
1736
  if (op->set_accept_stream) {
@@ -1808,43 +1740,40 @@ static void perform_transport_op_locked(grpc_exec_ctx* exec_ctx,
1808
1740
  }
1809
1741
 
1810
1742
  if (op->bind_pollset) {
1811
- grpc_endpoint_add_to_pollset(exec_ctx, t->ep, op->bind_pollset);
1743
+ grpc_endpoint_add_to_pollset(t->ep, op->bind_pollset);
1812
1744
  }
1813
1745
 
1814
1746
  if (op->bind_pollset_set) {
1815
- grpc_endpoint_add_to_pollset_set(exec_ctx, t->ep, op->bind_pollset_set);
1747
+ grpc_endpoint_add_to_pollset_set(t->ep, op->bind_pollset_set);
1816
1748
  }
1817
1749
 
1818
- if (op->send_ping) {
1819
- send_ping_locked(exec_ctx, t, nullptr, op->send_ping);
1820
- grpc_chttp2_initiate_write(exec_ctx, t,
1821
- GRPC_CHTTP2_INITIATE_WRITE_APPLICATION_PING);
1750
+ if (op->send_ping.on_initiate != nullptr || op->send_ping.on_ack != nullptr) {
1751
+ send_ping_locked(t, op->send_ping.on_initiate, op->send_ping.on_ack);
1752
+ grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_APPLICATION_PING);
1822
1753
  }
1823
1754
 
1824
1755
  if (op->on_connectivity_state_change != nullptr) {
1825
1756
  grpc_connectivity_state_notify_on_state_change(
1826
- exec_ctx, &t->channel_callback.state_tracker, op->connectivity_state,
1757
+ &t->channel_callback.state_tracker, op->connectivity_state,
1827
1758
  op->on_connectivity_state_change);
1828
1759
  }
1829
1760
 
1830
1761
  if (op->disconnect_with_error != GRPC_ERROR_NONE) {
1831
- close_transport_locked(exec_ctx, t, op->disconnect_with_error);
1762
+ close_transport_locked(t, op->disconnect_with_error);
1832
1763
  }
1833
1764
 
1834
- GRPC_CLOSURE_RUN(exec_ctx, op->on_consumed, GRPC_ERROR_NONE);
1765
+ GRPC_CLOSURE_RUN(op->on_consumed, GRPC_ERROR_NONE);
1835
1766
 
1836
- GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "transport_op");
1767
+ GRPC_CHTTP2_UNREF_TRANSPORT(t, "transport_op");
1837
1768
  }
1838
1769
 
1839
- static void perform_transport_op(grpc_exec_ctx* exec_ctx, grpc_transport* gt,
1840
- grpc_transport_op* op) {
1770
+ static void perform_transport_op(grpc_transport* gt, grpc_transport_op* op) {
1841
1771
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)gt;
1842
1772
  char* msg = grpc_transport_op_string(op);
1843
1773
  gpr_free(msg);
1844
1774
  op->handler_private.extra_arg = gt;
1845
1775
  GRPC_CHTTP2_REF_TRANSPORT(t, "transport_op");
1846
- GRPC_CLOSURE_SCHED(exec_ctx,
1847
- GRPC_CLOSURE_INIT(&op->handler_private.closure,
1776
+ GRPC_CLOSURE_SCHED(GRPC_CLOSURE_INIT(&op->handler_private.closure,
1848
1777
  perform_transport_op_locked, op,
1849
1778
  grpc_combiner_scheduler(t->combiner)),
1850
1779
  GRPC_ERROR_NONE);
@@ -1854,36 +1783,33 @@ static void perform_transport_op(grpc_exec_ctx* exec_ctx, grpc_transport* gt,
1854
1783
  * INPUT PROCESSING - GENERAL
1855
1784
  */
1856
1785
 
1857
- void grpc_chttp2_maybe_complete_recv_initial_metadata(grpc_exec_ctx* exec_ctx,
1858
- grpc_chttp2_transport* t,
1786
+ void grpc_chttp2_maybe_complete_recv_initial_metadata(grpc_chttp2_transport* t,
1859
1787
  grpc_chttp2_stream* s) {
1860
1788
  if (s->recv_initial_metadata_ready != nullptr &&
1861
1789
  s->published_metadata[0] != GRPC_METADATA_NOT_PUBLISHED) {
1862
1790
  if (s->seen_error) {
1863
- grpc_slice_buffer_reset_and_unref_internal(exec_ctx, &s->frame_storage);
1791
+ grpc_slice_buffer_reset_and_unref_internal(&s->frame_storage);
1864
1792
  if (!s->pending_byte_stream) {
1865
1793
  grpc_slice_buffer_reset_and_unref_internal(
1866
- exec_ctx, &s->unprocessed_incoming_frames_buffer);
1794
+ &s->unprocessed_incoming_frames_buffer);
1867
1795
  }
1868
1796
  }
1869
- grpc_chttp2_incoming_metadata_buffer_publish(
1870
- exec_ctx, &s->metadata_buffer[0], s->recv_initial_metadata);
1871
- null_then_run_closure(exec_ctx, &s->recv_initial_metadata_ready,
1872
- GRPC_ERROR_NONE);
1797
+ grpc_chttp2_incoming_metadata_buffer_publish(&s->metadata_buffer[0],
1798
+ s->recv_initial_metadata);
1799
+ null_then_run_closure(&s->recv_initial_metadata_ready, GRPC_ERROR_NONE);
1873
1800
  }
1874
1801
  }
1875
1802
 
1876
- void grpc_chttp2_maybe_complete_recv_message(grpc_exec_ctx* exec_ctx,
1877
- grpc_chttp2_transport* t,
1803
+ void grpc_chttp2_maybe_complete_recv_message(grpc_chttp2_transport* t,
1878
1804
  grpc_chttp2_stream* s) {
1879
1805
  grpc_error* error = GRPC_ERROR_NONE;
1880
1806
  if (s->recv_message_ready != nullptr) {
1881
1807
  *s->recv_message = nullptr;
1882
1808
  if (s->final_metadata_requested && s->seen_error) {
1883
- grpc_slice_buffer_reset_and_unref_internal(exec_ctx, &s->frame_storage);
1809
+ grpc_slice_buffer_reset_and_unref_internal(&s->frame_storage);
1884
1810
  if (!s->pending_byte_stream) {
1885
1811
  grpc_slice_buffer_reset_and_unref_internal(
1886
- exec_ctx, &s->unprocessed_incoming_frames_buffer);
1812
+ &s->unprocessed_incoming_frames_buffer);
1887
1813
  }
1888
1814
  }
1889
1815
  if (!s->pending_byte_stream) {
@@ -1910,10 +1836,9 @@ void grpc_chttp2_maybe_complete_recv_message(grpc_exec_ctx* exec_ctx,
1910
1836
  &s->decompressed_data_buffer, nullptr,
1911
1837
  GRPC_HEADER_SIZE_IN_BYTES - s->decompressed_header_bytes,
1912
1838
  &end_of_context)) {
1913
- grpc_slice_buffer_reset_and_unref_internal(exec_ctx,
1914
- &s->frame_storage);
1839
+ grpc_slice_buffer_reset_and_unref_internal(&s->frame_storage);
1915
1840
  grpc_slice_buffer_reset_and_unref_internal(
1916
- exec_ctx, &s->unprocessed_incoming_frames_buffer);
1841
+ &s->unprocessed_incoming_frames_buffer);
1917
1842
  error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
1918
1843
  "Stream decompression error.");
1919
1844
  } else {
@@ -1922,8 +1847,8 @@ void grpc_chttp2_maybe_complete_recv_message(grpc_exec_ctx* exec_ctx,
1922
1847
  s->decompressed_header_bytes = 0;
1923
1848
  }
1924
1849
  error = grpc_deframe_unprocessed_incoming_frames(
1925
- exec_ctx, &s->data_parser, s, &s->decompressed_data_buffer,
1926
- nullptr, s->recv_message);
1850
+ &s->data_parser, s, &s->decompressed_data_buffer, nullptr,
1851
+ s->recv_message);
1927
1852
  if (end_of_context) {
1928
1853
  grpc_stream_compression_context_destroy(
1929
1854
  s->stream_decompression_ctx);
@@ -1932,15 +1857,14 @@ void grpc_chttp2_maybe_complete_recv_message(grpc_exec_ctx* exec_ctx,
1932
1857
  }
1933
1858
  } else {
1934
1859
  error = grpc_deframe_unprocessed_incoming_frames(
1935
- exec_ctx, &s->data_parser, s,
1936
- &s->unprocessed_incoming_frames_buffer, nullptr, s->recv_message);
1860
+ &s->data_parser, s, &s->unprocessed_incoming_frames_buffer,
1861
+ nullptr, s->recv_message);
1937
1862
  }
1938
1863
  if (error != GRPC_ERROR_NONE) {
1939
1864
  s->seen_error = true;
1940
- grpc_slice_buffer_reset_and_unref_internal(exec_ctx,
1941
- &s->frame_storage);
1865
+ grpc_slice_buffer_reset_and_unref_internal(&s->frame_storage);
1942
1866
  grpc_slice_buffer_reset_and_unref_internal(
1943
- exec_ctx, &s->unprocessed_incoming_frames_buffer);
1867
+ &s->unprocessed_incoming_frames_buffer);
1944
1868
  break;
1945
1869
  } else if (*s->recv_message != nullptr) {
1946
1870
  break;
@@ -1948,26 +1872,25 @@ void grpc_chttp2_maybe_complete_recv_message(grpc_exec_ctx* exec_ctx,
1948
1872
  }
1949
1873
  }
1950
1874
  if (error == GRPC_ERROR_NONE && *s->recv_message != nullptr) {
1951
- null_then_run_closure(exec_ctx, &s->recv_message_ready, GRPC_ERROR_NONE);
1875
+ null_then_run_closure(&s->recv_message_ready, GRPC_ERROR_NONE);
1952
1876
  } else if (s->published_metadata[1] != GRPC_METADATA_NOT_PUBLISHED) {
1953
1877
  *s->recv_message = nullptr;
1954
- null_then_run_closure(exec_ctx, &s->recv_message_ready, GRPC_ERROR_NONE);
1878
+ null_then_run_closure(&s->recv_message_ready, GRPC_ERROR_NONE);
1955
1879
  }
1956
1880
  GRPC_ERROR_UNREF(error);
1957
1881
  }
1958
1882
  }
1959
1883
 
1960
- void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_exec_ctx* exec_ctx,
1961
- grpc_chttp2_transport* t,
1884
+ void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_chttp2_transport* t,
1962
1885
  grpc_chttp2_stream* s) {
1963
- grpc_chttp2_maybe_complete_recv_message(exec_ctx, t, s);
1886
+ grpc_chttp2_maybe_complete_recv_message(t, s);
1964
1887
  if (s->recv_trailing_metadata_finished != nullptr && s->read_closed &&
1965
1888
  s->write_closed) {
1966
1889
  if (s->seen_error) {
1967
- grpc_slice_buffer_reset_and_unref_internal(exec_ctx, &s->frame_storage);
1890
+ grpc_slice_buffer_reset_and_unref_internal(&s->frame_storage);
1968
1891
  if (!s->pending_byte_stream) {
1969
1892
  grpc_slice_buffer_reset_and_unref_internal(
1970
- exec_ctx, &s->unprocessed_incoming_frames_buffer);
1893
+ &s->unprocessed_incoming_frames_buffer);
1971
1894
  }
1972
1895
  }
1973
1896
  bool pending_data = s->pending_byte_stream ||
@@ -1985,9 +1908,9 @@ void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_exec_ctx* exec_ctx,
1985
1908
  s->stream_decompression_ctx, &s->frame_storage,
1986
1909
  &s->unprocessed_incoming_frames_buffer, nullptr,
1987
1910
  GRPC_HEADER_SIZE_IN_BYTES, &end_of_context)) {
1988
- grpc_slice_buffer_reset_and_unref_internal(exec_ctx, &s->frame_storage);
1911
+ grpc_slice_buffer_reset_and_unref_internal(&s->frame_storage);
1989
1912
  grpc_slice_buffer_reset_and_unref_internal(
1990
- exec_ctx, &s->unprocessed_incoming_frames_buffer);
1913
+ &s->unprocessed_incoming_frames_buffer);
1991
1914
  s->seen_error = true;
1992
1915
  } else {
1993
1916
  if (s->unprocessed_incoming_frames_buffer.length > 0) {
@@ -2002,23 +1925,23 @@ void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_exec_ctx* exec_ctx,
2002
1925
  }
2003
1926
  if (s->read_closed && s->frame_storage.length == 0 && !pending_data &&
2004
1927
  s->recv_trailing_metadata_finished != nullptr) {
2005
- grpc_chttp2_incoming_metadata_buffer_publish(
2006
- exec_ctx, &s->metadata_buffer[1], s->recv_trailing_metadata);
1928
+ grpc_chttp2_incoming_metadata_buffer_publish(&s->metadata_buffer[1],
1929
+ s->recv_trailing_metadata);
2007
1930
  grpc_chttp2_complete_closure_step(
2008
- exec_ctx, t, s, &s->recv_trailing_metadata_finished, GRPC_ERROR_NONE,
1931
+ t, s, &s->recv_trailing_metadata_finished, GRPC_ERROR_NONE,
2009
1932
  "recv_trailing_metadata_finished");
2010
1933
  }
2011
1934
  }
2012
1935
  }
2013
1936
 
2014
- static void remove_stream(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
2015
- uint32_t id, grpc_error* error) {
1937
+ static void remove_stream(grpc_chttp2_transport* t, uint32_t id,
1938
+ grpc_error* error) {
2016
1939
  grpc_chttp2_stream* s =
2017
1940
  (grpc_chttp2_stream*)grpc_chttp2_stream_map_delete(&t->stream_map, id);
2018
1941
  GPR_ASSERT(s);
2019
1942
  if (t->incoming_stream == s) {
2020
1943
  t->incoming_stream = nullptr;
2021
- grpc_chttp2_parsing_become_skip_parser(exec_ctx, t);
1944
+ grpc_chttp2_parsing_become_skip_parser(t);
2022
1945
  }
2023
1946
  if (s->pending_byte_stream) {
2024
1947
  if (s->on_next != nullptr) {
@@ -2026,8 +1949,8 @@ static void remove_stream(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
2026
1949
  if (error == GRPC_ERROR_NONE) {
2027
1950
  error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Truncated message");
2028
1951
  }
2029
- incoming_byte_stream_publish_error(exec_ctx, bs, error);
2030
- incoming_byte_stream_unref(exec_ctx, bs);
1952
+ incoming_byte_stream_publish_error(bs, error);
1953
+ incoming_byte_stream_unref(bs);
2031
1954
  s->data_parser.parsing_frame = nullptr;
2032
1955
  } else {
2033
1956
  GRPC_ERROR_UNREF(s->byte_stream_error);
@@ -2036,56 +1959,52 @@ static void remove_stream(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
2036
1959
  }
2037
1960
 
2038
1961
  if (grpc_chttp2_stream_map_size(&t->stream_map) == 0) {
2039
- post_benign_reclaimer(exec_ctx, t);
1962
+ post_benign_reclaimer(t);
2040
1963
  if (t->sent_goaway_state == GRPC_CHTTP2_GOAWAY_SENT) {
2041
1964
  close_transport_locked(
2042
- exec_ctx, t,
2043
- GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
2044
- "Last stream closed after sending GOAWAY", &error, 1));
1965
+ t, GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
1966
+ "Last stream closed after sending GOAWAY", &error, 1));
2045
1967
  }
2046
1968
  }
2047
1969
  if (grpc_chttp2_list_remove_writable_stream(t, s)) {
2048
- GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:remove_stream");
1970
+ GRPC_CHTTP2_STREAM_UNREF(s, "chttp2_writing:remove_stream");
2049
1971
  }
2050
1972
 
2051
1973
  GRPC_ERROR_UNREF(error);
2052
1974
 
2053
- maybe_start_some_streams(exec_ctx, t);
1975
+ maybe_start_some_streams(t);
2054
1976
  }
2055
1977
 
2056
- void grpc_chttp2_cancel_stream(grpc_exec_ctx* exec_ctx,
2057
- grpc_chttp2_transport* t, grpc_chttp2_stream* s,
1978
+ void grpc_chttp2_cancel_stream(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
2058
1979
  grpc_error* due_to_error) {
2059
1980
  if (!t->is_client && !s->sent_trailing_metadata &&
2060
1981
  grpc_error_has_clear_grpc_status(due_to_error)) {
2061
- close_from_api(exec_ctx, t, s, due_to_error);
1982
+ close_from_api(t, s, due_to_error);
2062
1983
  return;
2063
1984
  }
2064
1985
 
2065
1986
  if (!s->read_closed || !s->write_closed) {
2066
1987
  if (s->id != 0) {
2067
1988
  grpc_http2_error_code http_error;
2068
- grpc_error_get_status(exec_ctx, due_to_error, s->deadline, nullptr,
2069
- nullptr, &http_error, nullptr);
1989
+ grpc_error_get_status(due_to_error, s->deadline, nullptr, nullptr,
1990
+ &http_error, nullptr);
2070
1991
  grpc_slice_buffer_add(
2071
1992
  &t->qbuf, grpc_chttp2_rst_stream_create(s->id, (uint32_t)http_error,
2072
1993
  &s->stats.outgoing));
2073
- grpc_chttp2_initiate_write(exec_ctx, t,
2074
- GRPC_CHTTP2_INITIATE_WRITE_RST_STREAM);
1994
+ grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_RST_STREAM);
2075
1995
  }
2076
1996
  }
2077
1997
  if (due_to_error != GRPC_ERROR_NONE && !s->seen_error) {
2078
1998
  s->seen_error = true;
2079
1999
  }
2080
- grpc_chttp2_mark_stream_closed(exec_ctx, t, s, 1, 1, due_to_error);
2000
+ grpc_chttp2_mark_stream_closed(t, s, 1, 1, due_to_error);
2081
2001
  }
2082
2002
 
2083
- void grpc_chttp2_fake_status(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
2084
- grpc_chttp2_stream* s, grpc_error* error) {
2003
+ void grpc_chttp2_fake_status(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
2004
+ grpc_error* error) {
2085
2005
  grpc_status_code status;
2086
2006
  grpc_slice slice;
2087
- grpc_error_get_status(exec_ctx, error, s->deadline, &status, &slice, nullptr,
2088
- nullptr);
2007
+ grpc_error_get_status(error, s->deadline, &status, &slice, nullptr, nullptr);
2089
2008
  if (status != GRPC_STATUS_OK) {
2090
2009
  s->seen_error = true;
2091
2010
  }
@@ -2101,20 +2020,20 @@ void grpc_chttp2_fake_status(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
2101
2020
  gpr_ltoa(status, status_string);
2102
2021
  GRPC_LOG_IF_ERROR("add_status",
2103
2022
  grpc_chttp2_incoming_metadata_buffer_replace_or_add(
2104
- exec_ctx, &s->metadata_buffer[1],
2023
+ &s->metadata_buffer[1],
2105
2024
  grpc_mdelem_from_slices(
2106
- exec_ctx, GRPC_MDSTR_GRPC_STATUS,
2025
+ GRPC_MDSTR_GRPC_STATUS,
2107
2026
  grpc_slice_from_copied_string(status_string))));
2108
2027
  if (!GRPC_SLICE_IS_EMPTY(slice)) {
2109
2028
  GRPC_LOG_IF_ERROR(
2110
2029
  "add_status_message",
2111
2030
  grpc_chttp2_incoming_metadata_buffer_replace_or_add(
2112
- exec_ctx, &s->metadata_buffer[1],
2113
- grpc_mdelem_from_slices(exec_ctx, GRPC_MDSTR_GRPC_MESSAGE,
2031
+ &s->metadata_buffer[1],
2032
+ grpc_mdelem_from_slices(GRPC_MDSTR_GRPC_MESSAGE,
2114
2033
  grpc_slice_ref_internal(slice))));
2115
2034
  }
2116
2035
  s->published_metadata[1] = GRPC_METADATA_SYNTHESIZED_FROM_FAKE;
2117
- grpc_chttp2_maybe_complete_recv_trailing_metadata(exec_ctx, t, s);
2036
+ grpc_chttp2_maybe_complete_recv_trailing_metadata(t, s);
2118
2037
  }
2119
2038
 
2120
2039
  GRPC_ERROR_UNREF(error);
@@ -2147,14 +2066,12 @@ static grpc_error* removal_error(grpc_error* extra_error, grpc_chttp2_stream* s,
2147
2066
  return error;
2148
2067
  }
2149
2068
 
2150
- static void flush_write_list(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
2151
- grpc_chttp2_stream* s, grpc_chttp2_write_cb** list,
2152
- grpc_error* error) {
2069
+ static void flush_write_list(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
2070
+ grpc_chttp2_write_cb** list, grpc_error* error) {
2153
2071
  while (*list) {
2154
2072
  grpc_chttp2_write_cb* cb = *list;
2155
2073
  *list = cb->next;
2156
- grpc_chttp2_complete_closure_step(exec_ctx, t, s, &cb->closure,
2157
- GRPC_ERROR_REF(error),
2074
+ grpc_chttp2_complete_closure_step(t, s, &cb->closure, GRPC_ERROR_REF(error),
2158
2075
  "on_write_finished_cb");
2159
2076
  cb->next = t->write_cb_pool;
2160
2077
  t->write_cb_pool = cb;
@@ -2162,37 +2079,34 @@ static void flush_write_list(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
2162
2079
  GRPC_ERROR_UNREF(error);
2163
2080
  }
2164
2081
 
2165
- void grpc_chttp2_fail_pending_writes(grpc_exec_ctx* exec_ctx,
2166
- grpc_chttp2_transport* t,
2082
+ void grpc_chttp2_fail_pending_writes(grpc_chttp2_transport* t,
2167
2083
  grpc_chttp2_stream* s, grpc_error* error) {
2168
2084
  error =
2169
2085
  removal_error(error, s, "Pending writes failed due to stream closure");
2170
2086
  s->send_initial_metadata = nullptr;
2171
- grpc_chttp2_complete_closure_step(
2172
- exec_ctx, t, s, &s->send_initial_metadata_finished, GRPC_ERROR_REF(error),
2173
- "send_initial_metadata_finished");
2087
+ grpc_chttp2_complete_closure_step(t, s, &s->send_initial_metadata_finished,
2088
+ GRPC_ERROR_REF(error),
2089
+ "send_initial_metadata_finished");
2174
2090
 
2175
2091
  s->send_trailing_metadata = nullptr;
2176
- grpc_chttp2_complete_closure_step(
2177
- exec_ctx, t, s, &s->send_trailing_metadata_finished,
2178
- GRPC_ERROR_REF(error), "send_trailing_metadata_finished");
2092
+ grpc_chttp2_complete_closure_step(t, s, &s->send_trailing_metadata_finished,
2093
+ GRPC_ERROR_REF(error),
2094
+ "send_trailing_metadata_finished");
2179
2095
 
2180
2096
  s->fetching_send_message = nullptr;
2181
- grpc_chttp2_complete_closure_step(
2182
- exec_ctx, t, s, &s->fetching_send_message_finished, GRPC_ERROR_REF(error),
2183
- "fetching_send_message_finished");
2184
- flush_write_list(exec_ctx, t, s, &s->on_write_finished_cbs,
2185
- GRPC_ERROR_REF(error));
2186
- flush_write_list(exec_ctx, t, s, &s->on_flow_controlled_cbs, error);
2097
+ grpc_chttp2_complete_closure_step(t, s, &s->fetching_send_message_finished,
2098
+ GRPC_ERROR_REF(error),
2099
+ "fetching_send_message_finished");
2100
+ flush_write_list(t, s, &s->on_write_finished_cbs, GRPC_ERROR_REF(error));
2101
+ flush_write_list(t, s, &s->on_flow_controlled_cbs, error);
2187
2102
  }
2188
2103
 
2189
- void grpc_chttp2_mark_stream_closed(grpc_exec_ctx* exec_ctx,
2190
- grpc_chttp2_transport* t,
2104
+ void grpc_chttp2_mark_stream_closed(grpc_chttp2_transport* t,
2191
2105
  grpc_chttp2_stream* s, int close_reads,
2192
2106
  int close_writes, grpc_error* error) {
2193
2107
  if (s->read_closed && s->write_closed) {
2194
2108
  /* already closed */
2195
- grpc_chttp2_maybe_complete_recv_trailing_metadata(exec_ctx, t, s);
2109
+ grpc_chttp2_maybe_complete_recv_trailing_metadata(t, s);
2196
2110
  GRPC_ERROR_UNREF(error);
2197
2111
  return;
2198
2112
  }
@@ -2206,20 +2120,20 @@ void grpc_chttp2_mark_stream_closed(grpc_exec_ctx* exec_ctx,
2206
2120
  if (close_writes && !s->write_closed) {
2207
2121
  s->write_closed_error = GRPC_ERROR_REF(error);
2208
2122
  s->write_closed = true;
2209
- grpc_chttp2_fail_pending_writes(exec_ctx, t, s, GRPC_ERROR_REF(error));
2123
+ grpc_chttp2_fail_pending_writes(t, s, GRPC_ERROR_REF(error));
2210
2124
  }
2211
2125
  if (s->read_closed && s->write_closed) {
2212
2126
  became_closed = true;
2213
2127
  grpc_error* overall_error =
2214
2128
  removal_error(GRPC_ERROR_REF(error), s, "Stream removed");
2215
2129
  if (s->id != 0) {
2216
- remove_stream(exec_ctx, t, s->id, GRPC_ERROR_REF(overall_error));
2130
+ remove_stream(t, s->id, GRPC_ERROR_REF(overall_error));
2217
2131
  } else {
2218
2132
  /* Purge streams waiting on concurrency still waiting for id assignment */
2219
2133
  grpc_chttp2_list_remove_waiting_for_concurrency(t, s);
2220
2134
  }
2221
2135
  if (overall_error != GRPC_ERROR_NONE) {
2222
- grpc_chttp2_fake_status(exec_ctx, t, s, overall_error);
2136
+ grpc_chttp2_fake_status(t, s, overall_error);
2223
2137
  }
2224
2138
  }
2225
2139
  if (closed_read) {
@@ -2228,18 +2142,18 @@ void grpc_chttp2_mark_stream_closed(grpc_exec_ctx* exec_ctx,
2228
2142
  s->published_metadata[i] = GPRC_METADATA_PUBLISHED_AT_CLOSE;
2229
2143
  }
2230
2144
  }
2231
- grpc_chttp2_maybe_complete_recv_initial_metadata(exec_ctx, t, s);
2232
- grpc_chttp2_maybe_complete_recv_message(exec_ctx, t, s);
2145
+ grpc_chttp2_maybe_complete_recv_initial_metadata(t, s);
2146
+ grpc_chttp2_maybe_complete_recv_message(t, s);
2233
2147
  }
2234
2148
  if (became_closed) {
2235
- grpc_chttp2_maybe_complete_recv_trailing_metadata(exec_ctx, t, s);
2236
- GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2");
2149
+ grpc_chttp2_maybe_complete_recv_trailing_metadata(t, s);
2150
+ GRPC_CHTTP2_STREAM_UNREF(s, "chttp2");
2237
2151
  }
2238
2152
  GRPC_ERROR_UNREF(error);
2239
2153
  }
2240
2154
 
2241
- static void close_from_api(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
2242
- grpc_chttp2_stream* s, grpc_error* error) {
2155
+ static void close_from_api(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
2156
+ grpc_error* error) {
2243
2157
  grpc_slice hdr;
2244
2158
  grpc_slice status_hdr;
2245
2159
  grpc_slice http_status_hdr;
@@ -2249,8 +2163,8 @@ static void close_from_api(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
2249
2163
  uint32_t len = 0;
2250
2164
  grpc_status_code grpc_status;
2251
2165
  grpc_slice slice;
2252
- grpc_error_get_status(exec_ctx, error, s->deadline, &grpc_status, &slice,
2253
- nullptr, nullptr);
2166
+ grpc_error_get_status(error, s->deadline, &grpc_status, &slice, nullptr,
2167
+ nullptr);
2254
2168
 
2255
2169
  GPR_ASSERT(grpc_status >= 0 && (int)grpc_status < 100);
2256
2170
 
@@ -2392,13 +2306,11 @@ static void close_from_api(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
2392
2306
  &t->qbuf, grpc_chttp2_rst_stream_create(s->id, GRPC_HTTP2_NO_ERROR,
2393
2307
  &s->stats.outgoing));
2394
2308
 
2395
- grpc_chttp2_mark_stream_closed(exec_ctx, t, s, 1, 1, error);
2396
- grpc_chttp2_initiate_write(exec_ctx, t,
2397
- GRPC_CHTTP2_INITIATE_WRITE_CLOSE_FROM_API);
2309
+ grpc_chttp2_mark_stream_closed(t, s, 1, 1, error);
2310
+ grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_CLOSE_FROM_API);
2398
2311
  }
2399
2312
 
2400
2313
  typedef struct {
2401
- grpc_exec_ctx* exec_ctx;
2402
2314
  grpc_error* error;
2403
2315
  grpc_chttp2_transport* t;
2404
2316
  } cancel_stream_cb_args;
@@ -2406,13 +2318,11 @@ typedef struct {
2406
2318
  static void cancel_stream_cb(void* user_data, uint32_t key, void* stream) {
2407
2319
  cancel_stream_cb_args* args = (cancel_stream_cb_args*)user_data;
2408
2320
  grpc_chttp2_stream* s = (grpc_chttp2_stream*)stream;
2409
- grpc_chttp2_cancel_stream(args->exec_ctx, args->t, s,
2410
- GRPC_ERROR_REF(args->error));
2321
+ grpc_chttp2_cancel_stream(args->t, s, GRPC_ERROR_REF(args->error));
2411
2322
  }
2412
2323
 
2413
- static void end_all_the_calls(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
2414
- grpc_error* error) {
2415
- cancel_stream_cb_args args = {exec_ctx, error, t};
2324
+ static void end_all_the_calls(grpc_chttp2_transport* t, grpc_error* error) {
2325
+ cancel_stream_cb_args args = {error, t};
2416
2326
  grpc_chttp2_stream_map_for_each(&t->stream_map, cancel_stream_cb, &args);
2417
2327
  GRPC_ERROR_UNREF(error);
2418
2328
  }
@@ -2422,14 +2332,14 @@ static void end_all_the_calls(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
2422
2332
  */
2423
2333
 
2424
2334
  template <class F>
2425
- static void WithUrgency(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
2335
+ static void WithUrgency(grpc_chttp2_transport* t,
2426
2336
  grpc_core::chttp2::FlowControlAction::Urgency urgency,
2427
2337
  grpc_chttp2_initiate_write_reason reason, F action) {
2428
2338
  switch (urgency) {
2429
2339
  case grpc_core::chttp2::FlowControlAction::Urgency::NO_ACTION_NEEDED:
2430
2340
  break;
2431
2341
  case grpc_core::chttp2::FlowControlAction::Urgency::UPDATE_IMMEDIATELY:
2432
- grpc_chttp2_initiate_write(exec_ctx, t, reason);
2342
+ grpc_chttp2_initiate_write(t, reason);
2433
2343
  // fallthrough
2434
2344
  case grpc_core::chttp2::FlowControlAction::Urgency::QUEUE_UPDATE:
2435
2345
  action();
@@ -2438,31 +2348,27 @@ static void WithUrgency(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t,
2438
2348
  }
2439
2349
 
2440
2350
  void grpc_chttp2_act_on_flowctl_action(
2441
- grpc_exec_ctx* exec_ctx, const grpc_core::chttp2::FlowControlAction& action,
2351
+ const grpc_core::chttp2::FlowControlAction& action,
2442
2352
  grpc_chttp2_transport* t, grpc_chttp2_stream* s) {
2443
- WithUrgency(
2444
- exec_ctx, t, action.send_stream_update(),
2445
- GRPC_CHTTP2_INITIATE_WRITE_STREAM_FLOW_CONTROL,
2446
- [exec_ctx, t, s]() { grpc_chttp2_mark_stream_writable(exec_ctx, t, s); });
2447
- WithUrgency(exec_ctx, t, action.send_transport_update(),
2353
+ WithUrgency(t, action.send_stream_update(),
2354
+ GRPC_CHTTP2_INITIATE_WRITE_STREAM_FLOW_CONTROL,
2355
+ [t, s]() { grpc_chttp2_mark_stream_writable(t, s); });
2356
+ WithUrgency(t, action.send_transport_update(),
2448
2357
  GRPC_CHTTP2_INITIATE_WRITE_TRANSPORT_FLOW_CONTROL, []() {});
2449
- WithUrgency(exec_ctx, t, action.send_initial_window_update(),
2450
- GRPC_CHTTP2_INITIATE_WRITE_SEND_SETTINGS,
2451
- [exec_ctx, t, &action]() {
2452
- queue_setting_update(exec_ctx, t,
2358
+ WithUrgency(t, action.send_initial_window_update(),
2359
+ GRPC_CHTTP2_INITIATE_WRITE_SEND_SETTINGS, [t, &action]() {
2360
+ queue_setting_update(t,
2453
2361
  GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE,
2454
2362
  action.initial_window_size());
2455
2363
  });
2456
- WithUrgency(
2457
- exec_ctx, t, action.send_max_frame_size_update(),
2458
- GRPC_CHTTP2_INITIATE_WRITE_SEND_SETTINGS, [exec_ctx, t, &action]() {
2459
- queue_setting_update(exec_ctx, t, GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE,
2460
- action.max_frame_size());
2461
- });
2364
+ WithUrgency(t, action.send_max_frame_size_update(),
2365
+ GRPC_CHTTP2_INITIATE_WRITE_SEND_SETTINGS, [t, &action]() {
2366
+ queue_setting_update(t, GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE,
2367
+ action.max_frame_size());
2368
+ });
2462
2369
  }
2463
2370
 
2464
- static grpc_error* try_http_parsing(grpc_exec_ctx* exec_ctx,
2465
- grpc_chttp2_transport* t) {
2371
+ static grpc_error* try_http_parsing(grpc_chttp2_transport* t) {
2466
2372
  grpc_http_parser parser;
2467
2373
  size_t i = 0;
2468
2374
  grpc_error* error = GRPC_ERROR_NONE;
@@ -2491,8 +2397,7 @@ static grpc_error* try_http_parsing(grpc_exec_ctx* exec_ctx,
2491
2397
  return error;
2492
2398
  }
2493
2399
 
2494
- static void read_action_locked(grpc_exec_ctx* exec_ctx, void* tp,
2495
- grpc_error* error) {
2400
+ static void read_action_locked(void* tp, grpc_error* error) {
2496
2401
  GPR_TIMER_BEGIN("reading_action_locked", 0);
2497
2402
 
2498
2403
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)tp;
@@ -2514,13 +2419,15 @@ static void read_action_locked(grpc_exec_ctx* exec_ctx, void* tp,
2514
2419
  grpc_error* errors[3] = {GRPC_ERROR_REF(error), GRPC_ERROR_NONE,
2515
2420
  GRPC_ERROR_NONE};
2516
2421
  for (; i < t->read_buffer.count && errors[1] == GRPC_ERROR_NONE; i++) {
2517
- t->flow_control->bdp_estimator()->AddIncomingBytes(
2518
- (int64_t)GRPC_SLICE_LENGTH(t->read_buffer.slices[i]));
2519
- errors[1] =
2520
- grpc_chttp2_perform_read(exec_ctx, t, t->read_buffer.slices[i]);
2422
+ grpc_core::BdpEstimator* bdp_est = t->flow_control->bdp_estimator();
2423
+ if (bdp_est) {
2424
+ bdp_est->AddIncomingBytes(
2425
+ (int64_t)GRPC_SLICE_LENGTH(t->read_buffer.slices[i]));
2426
+ }
2427
+ errors[1] = grpc_chttp2_perform_read(t, t->read_buffer.slices[i]);
2521
2428
  }
2522
2429
  if (errors[1] != GRPC_ERROR_NONE) {
2523
- errors[2] = try_http_parsing(exec_ctx, t);
2430
+ errors[2] = try_http_parsing(t);
2524
2431
  GRPC_ERROR_UNREF(error);
2525
2432
  error = GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
2526
2433
  "Failed parsing HTTP/2", errors, GPR_ARRAY_SIZE(errors));
@@ -2535,10 +2442,9 @@ static void read_action_locked(grpc_exec_ctx* exec_ctx, void* tp,
2535
2442
  if (t->initial_window_update > 0) {
2536
2443
  grpc_chttp2_stream* s;
2537
2444
  while (grpc_chttp2_list_pop_stalled_by_stream(t, &s)) {
2538
- grpc_chttp2_mark_stream_writable(exec_ctx, t, s);
2445
+ grpc_chttp2_mark_stream_writable(t, s);
2539
2446
  grpc_chttp2_initiate_write(
2540
- exec_ctx, t,
2541
- GRPC_CHTTP2_INITIATE_WRITE_FLOW_CONTROL_UNSTALLED_BY_SETTING);
2447
+ t, GRPC_CHTTP2_INITIATE_WRITE_FLOW_CONTROL_UNSTALLED_BY_SETTING);
2542
2448
  }
2543
2449
  }
2544
2450
  t->initial_window_update = 0;
@@ -2559,22 +2465,21 @@ static void read_action_locked(grpc_exec_ctx* exec_ctx, void* tp,
2559
2465
  error = grpc_error_add_child(error, GRPC_ERROR_REF(t->goaway_error));
2560
2466
  }
2561
2467
 
2562
- close_transport_locked(exec_ctx, t, GRPC_ERROR_REF(error));
2468
+ close_transport_locked(t, GRPC_ERROR_REF(error));
2563
2469
  t->endpoint_reading = 0;
2564
2470
  } else if (t->closed_with_error == GRPC_ERROR_NONE) {
2565
2471
  keep_reading = true;
2566
2472
  GRPC_CHTTP2_REF_TRANSPORT(t, "keep_reading");
2567
2473
  }
2568
- grpc_slice_buffer_reset_and_unref_internal(exec_ctx, &t->read_buffer);
2474
+ grpc_slice_buffer_reset_and_unref_internal(&t->read_buffer);
2569
2475
 
2570
2476
  if (keep_reading) {
2571
- grpc_endpoint_read(exec_ctx, t->ep, &t->read_buffer,
2572
- &t->read_action_locked);
2573
- grpc_chttp2_act_on_flowctl_action(exec_ctx, t->flow_control->MakeAction(),
2574
- t, nullptr);
2575
- GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "keep_reading");
2477
+ grpc_endpoint_read(t->ep, &t->read_buffer, &t->read_action_locked);
2478
+ grpc_chttp2_act_on_flowctl_action(t->flow_control->MakeAction(), t,
2479
+ nullptr);
2480
+ GRPC_CHTTP2_UNREF_TRANSPORT(t, "keep_reading");
2576
2481
  } else {
2577
- GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "reading_action");
2482
+ GRPC_CHTTP2_UNREF_TRANSPORT(t, "reading_action");
2578
2483
  }
2579
2484
 
2580
2485
  GPR_TIMER_END("post_reading_action_locked", 0);
@@ -2586,15 +2491,12 @@ static void read_action_locked(grpc_exec_ctx* exec_ctx, void* tp,
2586
2491
 
2587
2492
  // t is reffed prior to calling the first time, and once the callback chain
2588
2493
  // that kicks off finishes, it's unreffed
2589
- static void schedule_bdp_ping_locked(grpc_exec_ctx* exec_ctx,
2590
- grpc_chttp2_transport* t) {
2494
+ static void schedule_bdp_ping_locked(grpc_chttp2_transport* t) {
2591
2495
  t->flow_control->bdp_estimator()->SchedulePing();
2592
- send_ping_locked(exec_ctx, t, &t->start_bdp_ping_locked,
2593
- &t->finish_bdp_ping_locked);
2496
+ send_ping_locked(t, &t->start_bdp_ping_locked, &t->finish_bdp_ping_locked);
2594
2497
  }
2595
2498
 
2596
- static void start_bdp_ping_locked(grpc_exec_ctx* exec_ctx, void* tp,
2597
- grpc_error* error) {
2499
+ static void start_bdp_ping_locked(void* tp, grpc_error* error) {
2598
2500
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)tp;
2599
2501
  if (grpc_http_trace.enabled()) {
2600
2502
  gpr_log(GPR_DEBUG, "%s: Start BDP ping err=%s", t->peer_string,
@@ -2602,42 +2504,39 @@ static void start_bdp_ping_locked(grpc_exec_ctx* exec_ctx, void* tp,
2602
2504
  }
2603
2505
  /* Reset the keepalive ping timer */
2604
2506
  if (t->keepalive_state == GRPC_CHTTP2_KEEPALIVE_STATE_WAITING) {
2605
- grpc_timer_cancel(exec_ctx, &t->keepalive_ping_timer);
2507
+ grpc_timer_cancel(&t->keepalive_ping_timer);
2606
2508
  }
2607
2509
  t->flow_control->bdp_estimator()->StartPing();
2608
2510
  }
2609
2511
 
2610
- static void finish_bdp_ping_locked(grpc_exec_ctx* exec_ctx, void* tp,
2611
- grpc_error* error) {
2512
+ static void finish_bdp_ping_locked(void* tp, grpc_error* error) {
2612
2513
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)tp;
2613
2514
  if (grpc_http_trace.enabled()) {
2614
2515
  gpr_log(GPR_DEBUG, "%s: Complete BDP ping err=%s", t->peer_string,
2615
2516
  grpc_error_string(error));
2616
2517
  }
2617
2518
  if (error != GRPC_ERROR_NONE) {
2618
- GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "bdp_ping");
2519
+ GRPC_CHTTP2_UNREF_TRANSPORT(t, "bdp_ping");
2619
2520
  return;
2620
2521
  }
2621
- grpc_millis next_ping =
2622
- t->flow_control->bdp_estimator()->CompletePing(exec_ctx);
2623
- grpc_chttp2_act_on_flowctl_action(
2624
- exec_ctx, t->flow_control->PeriodicUpdate(exec_ctx), t, nullptr);
2522
+ grpc_millis next_ping = t->flow_control->bdp_estimator()->CompletePing();
2523
+ grpc_chttp2_act_on_flowctl_action(t->flow_control->PeriodicUpdate(), t,
2524
+ nullptr);
2625
2525
  GPR_ASSERT(!t->have_next_bdp_ping_timer);
2626
2526
  t->have_next_bdp_ping_timer = true;
2627
- grpc_timer_init(exec_ctx, &t->next_bdp_ping_timer, next_ping,
2527
+ grpc_timer_init(&t->next_bdp_ping_timer, next_ping,
2628
2528
  &t->next_bdp_ping_timer_expired_locked);
2629
2529
  }
2630
2530
 
2631
- static void next_bdp_ping_timer_expired_locked(grpc_exec_ctx* exec_ctx,
2632
- void* tp, grpc_error* error) {
2531
+ static void next_bdp_ping_timer_expired_locked(void* tp, grpc_error* error) {
2633
2532
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)tp;
2634
2533
  GPR_ASSERT(t->have_next_bdp_ping_timer);
2635
2534
  t->have_next_bdp_ping_timer = false;
2636
2535
  if (error != GRPC_ERROR_NONE) {
2637
- GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "bdp_ping");
2536
+ GRPC_CHTTP2_UNREF_TRANSPORT(t, "bdp_ping");
2638
2537
  return;
2639
2538
  }
2640
- schedule_bdp_ping_locked(exec_ctx, t);
2539
+ schedule_bdp_ping_locked(t);
2641
2540
  }
2642
2541
 
2643
2542
  void grpc_chttp2_config_default_keepalive_args(grpc_channel_args* args,
@@ -2647,7 +2546,9 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args* args,
2647
2546
  for (i = 0; i < args->num_args; i++) {
2648
2547
  if (0 == strcmp(args->args[i].key, GRPC_ARG_KEEPALIVE_TIME_MS)) {
2649
2548
  const int value = grpc_channel_arg_get_integer(
2650
- &args->args[i], {g_default_client_keepalive_time_ms, 1, INT_MAX});
2549
+ &args->args[i], {is_client ? g_default_client_keepalive_time_ms
2550
+ : g_default_server_keepalive_time_ms,
2551
+ 1, INT_MAX});
2651
2552
  if (is_client) {
2652
2553
  g_default_client_keepalive_time_ms = value;
2653
2554
  } else {
@@ -2656,8 +2557,9 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args* args,
2656
2557
  } else if (0 ==
2657
2558
  strcmp(args->args[i].key, GRPC_ARG_KEEPALIVE_TIMEOUT_MS)) {
2658
2559
  const int value = grpc_channel_arg_get_integer(
2659
- &args->args[i],
2660
- {g_default_client_keepalive_timeout_ms, 0, INT_MAX});
2560
+ &args->args[i], {is_client ? g_default_client_keepalive_timeout_ms
2561
+ : g_default_server_keepalive_timeout_ms,
2562
+ 0, INT_MAX});
2661
2563
  if (is_client) {
2662
2564
  g_default_client_keepalive_timeout_ms = value;
2663
2565
  } else {
@@ -2665,10 +2567,16 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args* args,
2665
2567
  }
2666
2568
  } else if (0 == strcmp(args->args[i].key,
2667
2569
  GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS)) {
2668
- g_default_keepalive_permit_without_calls =
2669
- (uint32_t)grpc_channel_arg_get_integer(
2670
- &args->args[i],
2671
- {g_default_keepalive_permit_without_calls, 0, 1});
2570
+ const bool value = (uint32_t)grpc_channel_arg_get_integer(
2571
+ &args->args[i],
2572
+ {is_client ? g_default_client_keepalive_permit_without_calls
2573
+ : g_default_server_keepalive_timeout_ms,
2574
+ 0, 1});
2575
+ if (is_client) {
2576
+ g_default_client_keepalive_permit_without_calls = value;
2577
+ } else {
2578
+ g_default_server_keepalive_permit_without_calls = value;
2579
+ }
2672
2580
  } else if (0 ==
2673
2581
  strcmp(args->args[i].key, GRPC_ARG_HTTP2_MAX_PING_STRIKES)) {
2674
2582
  g_default_max_ping_strikes = grpc_channel_arg_get_integer(
@@ -2698,8 +2606,7 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args* args,
2698
2606
  }
2699
2607
  }
2700
2608
 
2701
- static void init_keepalive_ping_locked(grpc_exec_ctx* exec_ctx, void* arg,
2702
- grpc_error* error) {
2609
+ static void init_keepalive_ping_locked(void* arg, grpc_error* error) {
2703
2610
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)arg;
2704
2611
  GPR_ASSERT(t->keepalive_state == GRPC_CHTTP2_KEEPALIVE_STATE_WAITING);
2705
2612
  if (t->destroying || t->closed_with_error != GRPC_ERROR_NONE) {
@@ -2709,59 +2616,55 @@ static void init_keepalive_ping_locked(grpc_exec_ctx* exec_ctx, void* arg,
2709
2616
  grpc_chttp2_stream_map_size(&t->stream_map) > 0) {
2710
2617
  t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_PINGING;
2711
2618
  GRPC_CHTTP2_REF_TRANSPORT(t, "keepalive ping end");
2712
- send_ping_locked(exec_ctx, t, &t->start_keepalive_ping_locked,
2619
+ send_ping_locked(t, &t->start_keepalive_ping_locked,
2713
2620
  &t->finish_keepalive_ping_locked);
2714
- grpc_chttp2_initiate_write(exec_ctx, t,
2715
- GRPC_CHTTP2_INITIATE_WRITE_KEEPALIVE_PING);
2621
+ grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_KEEPALIVE_PING);
2716
2622
  } else {
2717
2623
  GRPC_CHTTP2_REF_TRANSPORT(t, "init keepalive ping");
2718
- grpc_timer_init(exec_ctx, &t->keepalive_ping_timer,
2719
- grpc_exec_ctx_now(exec_ctx) + t->keepalive_time,
2624
+ grpc_timer_init(&t->keepalive_ping_timer,
2625
+ grpc_core::ExecCtx::Get()->Now() + t->keepalive_time,
2720
2626
  &t->init_keepalive_ping_locked);
2721
2627
  }
2722
2628
  } else if (error == GRPC_ERROR_CANCELLED) {
2723
2629
  /* The keepalive ping timer may be cancelled by bdp */
2724
2630
  GRPC_CHTTP2_REF_TRANSPORT(t, "init keepalive ping");
2725
- grpc_timer_init(exec_ctx, &t->keepalive_ping_timer,
2726
- grpc_exec_ctx_now(exec_ctx) + t->keepalive_time,
2631
+ grpc_timer_init(&t->keepalive_ping_timer,
2632
+ grpc_core::ExecCtx::Get()->Now() + t->keepalive_time,
2727
2633
  &t->init_keepalive_ping_locked);
2728
2634
  }
2729
- GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "init keepalive ping");
2635
+ GRPC_CHTTP2_UNREF_TRANSPORT(t, "init keepalive ping");
2730
2636
  }
2731
2637
 
2732
- static void start_keepalive_ping_locked(grpc_exec_ctx* exec_ctx, void* arg,
2733
- grpc_error* error) {
2638
+ static void start_keepalive_ping_locked(void* arg, grpc_error* error) {
2734
2639
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)arg;
2735
2640
  GRPC_CHTTP2_REF_TRANSPORT(t, "keepalive watchdog");
2736
- grpc_timer_init(exec_ctx, &t->keepalive_watchdog_timer,
2737
- grpc_exec_ctx_now(exec_ctx) + t->keepalive_time,
2641
+ grpc_timer_init(&t->keepalive_watchdog_timer,
2642
+ grpc_core::ExecCtx::Get()->Now() + t->keepalive_time,
2738
2643
  &t->keepalive_watchdog_fired_locked);
2739
2644
  }
2740
2645
 
2741
- static void finish_keepalive_ping_locked(grpc_exec_ctx* exec_ctx, void* arg,
2742
- grpc_error* error) {
2646
+ static void finish_keepalive_ping_locked(void* arg, grpc_error* error) {
2743
2647
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)arg;
2744
2648
  if (t->keepalive_state == GRPC_CHTTP2_KEEPALIVE_STATE_PINGING) {
2745
2649
  if (error == GRPC_ERROR_NONE) {
2746
2650
  t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_WAITING;
2747
- grpc_timer_cancel(exec_ctx, &t->keepalive_watchdog_timer);
2651
+ grpc_timer_cancel(&t->keepalive_watchdog_timer);
2748
2652
  GRPC_CHTTP2_REF_TRANSPORT(t, "init keepalive ping");
2749
- grpc_timer_init(exec_ctx, &t->keepalive_ping_timer,
2750
- grpc_exec_ctx_now(exec_ctx) + t->keepalive_time,
2653
+ grpc_timer_init(&t->keepalive_ping_timer,
2654
+ grpc_core::ExecCtx::Get()->Now() + t->keepalive_time,
2751
2655
  &t->init_keepalive_ping_locked);
2752
2656
  }
2753
2657
  }
2754
- GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "keepalive ping end");
2658
+ GRPC_CHTTP2_UNREF_TRANSPORT(t, "keepalive ping end");
2755
2659
  }
2756
2660
 
2757
- static void keepalive_watchdog_fired_locked(grpc_exec_ctx* exec_ctx, void* arg,
2758
- grpc_error* error) {
2661
+ static void keepalive_watchdog_fired_locked(void* arg, grpc_error* error) {
2759
2662
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)arg;
2760
2663
  if (t->keepalive_state == GRPC_CHTTP2_KEEPALIVE_STATE_PINGING) {
2761
2664
  if (error == GRPC_ERROR_NONE) {
2762
2665
  t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_DYING;
2763
2666
  close_transport_locked(
2764
- exec_ctx, t,
2667
+ t,
2765
2668
  grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
2766
2669
  "keepalive watchdog timeout"),
2767
2670
  GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_INTERNAL));
@@ -2774,71 +2677,67 @@ static void keepalive_watchdog_fired_locked(grpc_exec_ctx* exec_ctx, void* arg,
2774
2677
  t->keepalive_state, GRPC_CHTTP2_KEEPALIVE_STATE_PINGING);
2775
2678
  }
2776
2679
  }
2777
- GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "keepalive watchdog");
2680
+ GRPC_CHTTP2_UNREF_TRANSPORT(t, "keepalive watchdog");
2778
2681
  }
2779
2682
 
2780
2683
  /*******************************************************************************
2781
2684
  * CALLBACK LOOP
2782
2685
  */
2783
2686
 
2784
- static void connectivity_state_set(grpc_exec_ctx* exec_ctx,
2785
- grpc_chttp2_transport* t,
2687
+ static void connectivity_state_set(grpc_chttp2_transport* t,
2786
2688
  grpc_connectivity_state state,
2787
2689
  grpc_error* error, const char* reason) {
2788
2690
  GRPC_CHTTP2_IF_TRACING(
2789
2691
  gpr_log(GPR_DEBUG, "set connectivity_state=%d", state));
2790
- grpc_connectivity_state_set(exec_ctx, &t->channel_callback.state_tracker,
2791
- state, error, reason);
2692
+ grpc_connectivity_state_set(&t->channel_callback.state_tracker, state, error,
2693
+ reason);
2792
2694
  }
2793
2695
 
2794
2696
  /*******************************************************************************
2795
2697
  * POLLSET STUFF
2796
2698
  */
2797
2699
 
2798
- static void set_pollset(grpc_exec_ctx* exec_ctx, grpc_transport* gt,
2799
- grpc_stream* gs, grpc_pollset* pollset) {
2700
+ static void set_pollset(grpc_transport* gt, grpc_stream* gs,
2701
+ grpc_pollset* pollset) {
2800
2702
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)gt;
2801
- grpc_endpoint_add_to_pollset(exec_ctx, t->ep, pollset);
2703
+ grpc_endpoint_add_to_pollset(t->ep, pollset);
2802
2704
  }
2803
2705
 
2804
- static void set_pollset_set(grpc_exec_ctx* exec_ctx, grpc_transport* gt,
2805
- grpc_stream* gs, grpc_pollset_set* pollset_set) {
2706
+ static void set_pollset_set(grpc_transport* gt, grpc_stream* gs,
2707
+ grpc_pollset_set* pollset_set) {
2806
2708
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)gt;
2807
- grpc_endpoint_add_to_pollset_set(exec_ctx, t->ep, pollset_set);
2709
+ grpc_endpoint_add_to_pollset_set(t->ep, pollset_set);
2808
2710
  }
2809
2711
 
2810
2712
  /*******************************************************************************
2811
2713
  * BYTE STREAM
2812
2714
  */
2813
2715
 
2814
- static void reset_byte_stream(grpc_exec_ctx* exec_ctx, void* arg,
2815
- grpc_error* error) {
2716
+ static void reset_byte_stream(void* arg, grpc_error* error) {
2816
2717
  grpc_chttp2_stream* s = (grpc_chttp2_stream*)arg;
2817
2718
 
2818
2719
  s->pending_byte_stream = false;
2819
2720
  if (error == GRPC_ERROR_NONE) {
2820
- grpc_chttp2_maybe_complete_recv_message(exec_ctx, s->t, s);
2821
- grpc_chttp2_maybe_complete_recv_trailing_metadata(exec_ctx, s->t, s);
2721
+ grpc_chttp2_maybe_complete_recv_message(s->t, s);
2722
+ grpc_chttp2_maybe_complete_recv_trailing_metadata(s->t, s);
2822
2723
  } else {
2823
2724
  GPR_ASSERT(error != GRPC_ERROR_NONE);
2824
- GRPC_CLOSURE_SCHED(exec_ctx, s->on_next, GRPC_ERROR_REF(error));
2725
+ GRPC_CLOSURE_SCHED(s->on_next, GRPC_ERROR_REF(error));
2825
2726
  s->on_next = nullptr;
2826
2727
  GRPC_ERROR_UNREF(s->byte_stream_error);
2827
2728
  s->byte_stream_error = GRPC_ERROR_NONE;
2828
- grpc_chttp2_cancel_stream(exec_ctx, s->t, s, GRPC_ERROR_REF(error));
2729
+ grpc_chttp2_cancel_stream(s->t, s, GRPC_ERROR_REF(error));
2829
2730
  s->byte_stream_error = GRPC_ERROR_REF(error);
2830
2731
  }
2831
2732
  }
2832
2733
 
2833
- static void incoming_byte_stream_unref(grpc_exec_ctx* exec_ctx,
2834
- grpc_chttp2_incoming_byte_stream* bs) {
2734
+ static void incoming_byte_stream_unref(grpc_chttp2_incoming_byte_stream* bs) {
2835
2735
  if (gpr_unref(&bs->refs)) {
2836
2736
  gpr_free(bs);
2837
2737
  }
2838
2738
  }
2839
2739
 
2840
- static void incoming_byte_stream_next_locked(grpc_exec_ctx* exec_ctx,
2841
- void* argp,
2740
+ static void incoming_byte_stream_next_locked(void* argp,
2842
2741
  grpc_error* error_ignored) {
2843
2742
  grpc_chttp2_incoming_byte_stream* bs =
2844
2743
  (grpc_chttp2_incoming_byte_stream*)argp;
@@ -2849,30 +2748,29 @@ static void incoming_byte_stream_next_locked(grpc_exec_ctx* exec_ctx,
2849
2748
  if (!s->read_closed) {
2850
2749
  s->flow_control->IncomingByteStreamUpdate(bs->next_action.max_size_hint,
2851
2750
  cur_length);
2852
- grpc_chttp2_act_on_flowctl_action(exec_ctx, s->flow_control->MakeAction(),
2853
- t, s);
2751
+ grpc_chttp2_act_on_flowctl_action(s->flow_control->MakeAction(), t, s);
2854
2752
  }
2855
2753
  GPR_ASSERT(s->unprocessed_incoming_frames_buffer.length == 0);
2856
2754
  if (s->frame_storage.length > 0) {
2857
2755
  grpc_slice_buffer_swap(&s->frame_storage,
2858
2756
  &s->unprocessed_incoming_frames_buffer);
2859
2757
  s->unprocessed_incoming_frames_decompressed = false;
2860
- GRPC_CLOSURE_SCHED(exec_ctx, bs->next_action.on_complete, GRPC_ERROR_NONE);
2758
+ GRPC_CLOSURE_SCHED(bs->next_action.on_complete, GRPC_ERROR_NONE);
2861
2759
  } else if (s->byte_stream_error != GRPC_ERROR_NONE) {
2862
- GRPC_CLOSURE_SCHED(exec_ctx, bs->next_action.on_complete,
2760
+ GRPC_CLOSURE_SCHED(bs->next_action.on_complete,
2863
2761
  GRPC_ERROR_REF(s->byte_stream_error));
2864
2762
  if (s->data_parser.parsing_frame != nullptr) {
2865
- incoming_byte_stream_unref(exec_ctx, s->data_parser.parsing_frame);
2763
+ incoming_byte_stream_unref(s->data_parser.parsing_frame);
2866
2764
  s->data_parser.parsing_frame = nullptr;
2867
2765
  }
2868
2766
  } else if (s->read_closed) {
2869
2767
  if (bs->remaining_bytes != 0) {
2870
2768
  s->byte_stream_error =
2871
2769
  GRPC_ERROR_CREATE_FROM_STATIC_STRING("Truncated message");
2872
- GRPC_CLOSURE_SCHED(exec_ctx, bs->next_action.on_complete,
2770
+ GRPC_CLOSURE_SCHED(bs->next_action.on_complete,
2873
2771
  GRPC_ERROR_REF(s->byte_stream_error));
2874
2772
  if (s->data_parser.parsing_frame != nullptr) {
2875
- incoming_byte_stream_unref(exec_ctx, s->data_parser.parsing_frame);
2773
+ incoming_byte_stream_unref(s->data_parser.parsing_frame);
2876
2774
  s->data_parser.parsing_frame = nullptr;
2877
2775
  }
2878
2776
  } else {
@@ -2882,11 +2780,10 @@ static void incoming_byte_stream_next_locked(grpc_exec_ctx* exec_ctx,
2882
2780
  } else {
2883
2781
  s->on_next = bs->next_action.on_complete;
2884
2782
  }
2885
- incoming_byte_stream_unref(exec_ctx, bs);
2783
+ incoming_byte_stream_unref(bs);
2886
2784
  }
2887
2785
 
2888
- static bool incoming_byte_stream_next(grpc_exec_ctx* exec_ctx,
2889
- grpc_byte_stream* byte_stream,
2786
+ static bool incoming_byte_stream_next(grpc_byte_stream* byte_stream,
2890
2787
  size_t max_size_hint,
2891
2788
  grpc_closure* on_complete) {
2892
2789
  GPR_TIMER_BEGIN("incoming_byte_stream_next", 0);
@@ -2901,7 +2798,6 @@ static bool incoming_byte_stream_next(grpc_exec_ctx* exec_ctx,
2901
2798
  bs->next_action.max_size_hint = max_size_hint;
2902
2799
  bs->next_action.on_complete = on_complete;
2903
2800
  GRPC_CLOSURE_SCHED(
2904
- exec_ctx,
2905
2801
  GRPC_CLOSURE_INIT(&bs->next_action.closure,
2906
2802
  incoming_byte_stream_next_locked, bs,
2907
2803
  grpc_combiner_scheduler(bs->transport->combiner)),
@@ -2911,8 +2807,7 @@ static bool incoming_byte_stream_next(grpc_exec_ctx* exec_ctx,
2911
2807
  }
2912
2808
  }
2913
2809
 
2914
- static grpc_error* incoming_byte_stream_pull(grpc_exec_ctx* exec_ctx,
2915
- grpc_byte_stream* byte_stream,
2810
+ static grpc_error* incoming_byte_stream_pull(grpc_byte_stream* byte_stream,
2916
2811
  grpc_slice* slice) {
2917
2812
  GPR_TIMER_BEGIN("incoming_byte_stream_pull", 0);
2918
2813
  grpc_chttp2_incoming_byte_stream* bs =
@@ -2948,31 +2843,28 @@ static grpc_error* incoming_byte_stream_pull(grpc_exec_ctx* exec_ctx,
2948
2843
  }
2949
2844
  }
2950
2845
  error = grpc_deframe_unprocessed_incoming_frames(
2951
- exec_ctx, &s->data_parser, s, &s->unprocessed_incoming_frames_buffer,
2952
- slice, nullptr);
2846
+ &s->data_parser, s, &s->unprocessed_incoming_frames_buffer, slice,
2847
+ nullptr);
2953
2848
  if (error != GRPC_ERROR_NONE) {
2954
2849
  return error;
2955
2850
  }
2956
2851
  } else {
2957
2852
  error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Truncated message");
2958
- GRPC_CLOSURE_SCHED(exec_ctx, &s->reset_byte_stream, GRPC_ERROR_REF(error));
2853
+ GRPC_CLOSURE_SCHED(&s->reset_byte_stream, GRPC_ERROR_REF(error));
2959
2854
  return error;
2960
2855
  }
2961
2856
  GPR_TIMER_END("incoming_byte_stream_pull", 0);
2962
2857
  return GRPC_ERROR_NONE;
2963
2858
  }
2964
2859
 
2965
- static void incoming_byte_stream_destroy_locked(grpc_exec_ctx* exec_ctx,
2966
- void* byte_stream,
2860
+ static void incoming_byte_stream_destroy_locked(void* byte_stream,
2967
2861
  grpc_error* error_ignored);
2968
2862
 
2969
- static void incoming_byte_stream_destroy(grpc_exec_ctx* exec_ctx,
2970
- grpc_byte_stream* byte_stream) {
2863
+ static void incoming_byte_stream_destroy(grpc_byte_stream* byte_stream) {
2971
2864
  GPR_TIMER_BEGIN("incoming_byte_stream_destroy", 0);
2972
2865
  grpc_chttp2_incoming_byte_stream* bs =
2973
2866
  (grpc_chttp2_incoming_byte_stream*)byte_stream;
2974
2867
  GRPC_CLOSURE_SCHED(
2975
- exec_ctx,
2976
2868
  GRPC_CLOSURE_INIT(&bs->destroy_action,
2977
2869
  incoming_byte_stream_destroy_locked, bs,
2978
2870
  grpc_combiner_scheduler(bs->transport->combiner)),
@@ -2981,30 +2873,28 @@ static void incoming_byte_stream_destroy(grpc_exec_ctx* exec_ctx,
2981
2873
  }
2982
2874
 
2983
2875
  static void incoming_byte_stream_publish_error(
2984
- grpc_exec_ctx* exec_ctx, grpc_chttp2_incoming_byte_stream* bs,
2985
- grpc_error* error) {
2876
+ grpc_chttp2_incoming_byte_stream* bs, grpc_error* error) {
2986
2877
  grpc_chttp2_stream* s = bs->stream;
2987
2878
 
2988
2879
  GPR_ASSERT(error != GRPC_ERROR_NONE);
2989
- GRPC_CLOSURE_SCHED(exec_ctx, s->on_next, GRPC_ERROR_REF(error));
2880
+ GRPC_CLOSURE_SCHED(s->on_next, GRPC_ERROR_REF(error));
2990
2881
  s->on_next = nullptr;
2991
2882
  GRPC_ERROR_UNREF(s->byte_stream_error);
2992
2883
  s->byte_stream_error = GRPC_ERROR_REF(error);
2993
- grpc_chttp2_cancel_stream(exec_ctx, bs->transport, bs->stream,
2994
- GRPC_ERROR_REF(error));
2884
+ grpc_chttp2_cancel_stream(bs->transport, bs->stream, GRPC_ERROR_REF(error));
2995
2885
  }
2996
2886
 
2997
2887
  grpc_error* grpc_chttp2_incoming_byte_stream_push(
2998
- grpc_exec_ctx* exec_ctx, grpc_chttp2_incoming_byte_stream* bs,
2999
- grpc_slice slice, grpc_slice* slice_out) {
2888
+ grpc_chttp2_incoming_byte_stream* bs, grpc_slice slice,
2889
+ grpc_slice* slice_out) {
3000
2890
  grpc_chttp2_stream* s = bs->stream;
3001
2891
 
3002
2892
  if (bs->remaining_bytes < GRPC_SLICE_LENGTH(slice)) {
3003
2893
  grpc_error* error =
3004
2894
  GRPC_ERROR_CREATE_FROM_STATIC_STRING("Too many bytes in stream");
3005
2895
 
3006
- GRPC_CLOSURE_SCHED(exec_ctx, &s->reset_byte_stream, GRPC_ERROR_REF(error));
3007
- grpc_slice_unref_internal(exec_ctx, slice);
2896
+ GRPC_CLOSURE_SCHED(&s->reset_byte_stream, GRPC_ERROR_REF(error));
2897
+ grpc_slice_unref_internal(slice);
3008
2898
  return error;
3009
2899
  } else {
3010
2900
  bs->remaining_bytes -= (uint32_t)GRPC_SLICE_LENGTH(slice);
@@ -3016,8 +2906,8 @@ grpc_error* grpc_chttp2_incoming_byte_stream_push(
3016
2906
  }
3017
2907
 
3018
2908
  grpc_error* grpc_chttp2_incoming_byte_stream_finished(
3019
- grpc_exec_ctx* exec_ctx, grpc_chttp2_incoming_byte_stream* bs,
3020
- grpc_error* error, bool reset_on_error) {
2909
+ grpc_chttp2_incoming_byte_stream* bs, grpc_error* error,
2910
+ bool reset_on_error) {
3021
2911
  grpc_chttp2_stream* s = bs->stream;
3022
2912
 
3023
2913
  if (error == GRPC_ERROR_NONE) {
@@ -3026,27 +2916,25 @@ grpc_error* grpc_chttp2_incoming_byte_stream_finished(
3026
2916
  }
3027
2917
  }
3028
2918
  if (error != GRPC_ERROR_NONE && reset_on_error) {
3029
- GRPC_CLOSURE_SCHED(exec_ctx, &s->reset_byte_stream, GRPC_ERROR_REF(error));
2919
+ GRPC_CLOSURE_SCHED(&s->reset_byte_stream, GRPC_ERROR_REF(error));
3030
2920
  }
3031
- incoming_byte_stream_unref(exec_ctx, bs);
2921
+ incoming_byte_stream_unref(bs);
3032
2922
  return error;
3033
2923
  }
3034
2924
 
3035
- static void incoming_byte_stream_shutdown(grpc_exec_ctx* exec_ctx,
3036
- grpc_byte_stream* byte_stream,
2925
+ static void incoming_byte_stream_shutdown(grpc_byte_stream* byte_stream,
3037
2926
  grpc_error* error) {
3038
2927
  grpc_chttp2_incoming_byte_stream* bs =
3039
2928
  (grpc_chttp2_incoming_byte_stream*)byte_stream;
3040
2929
  GRPC_ERROR_UNREF(grpc_chttp2_incoming_byte_stream_finished(
3041
- exec_ctx, bs, error, true /* reset_on_error */));
2930
+ bs, error, true /* reset_on_error */));
3042
2931
  }
3043
2932
 
3044
2933
  static const grpc_byte_stream_vtable grpc_chttp2_incoming_byte_stream_vtable = {
3045
2934
  incoming_byte_stream_next, incoming_byte_stream_pull,
3046
2935
  incoming_byte_stream_shutdown, incoming_byte_stream_destroy};
3047
2936
 
3048
- static void incoming_byte_stream_destroy_locked(grpc_exec_ctx* exec_ctx,
3049
- void* byte_stream,
2937
+ static void incoming_byte_stream_destroy_locked(void* byte_stream,
3050
2938
  grpc_error* error_ignored) {
3051
2939
  grpc_chttp2_incoming_byte_stream* bs =
3052
2940
  (grpc_chttp2_incoming_byte_stream*)byte_stream;
@@ -3054,15 +2942,15 @@ static void incoming_byte_stream_destroy_locked(grpc_exec_ctx* exec_ctx,
3054
2942
  grpc_chttp2_transport* t = s->t;
3055
2943
 
3056
2944
  GPR_ASSERT(bs->base.vtable == &grpc_chttp2_incoming_byte_stream_vtable);
3057
- incoming_byte_stream_unref(exec_ctx, bs);
2945
+ incoming_byte_stream_unref(bs);
3058
2946
  s->pending_byte_stream = false;
3059
- grpc_chttp2_maybe_complete_recv_message(exec_ctx, t, s);
3060
- grpc_chttp2_maybe_complete_recv_trailing_metadata(exec_ctx, t, s);
2947
+ grpc_chttp2_maybe_complete_recv_message(t, s);
2948
+ grpc_chttp2_maybe_complete_recv_trailing_metadata(t, s);
3061
2949
  }
3062
2950
 
3063
2951
  grpc_chttp2_incoming_byte_stream* grpc_chttp2_incoming_byte_stream_create(
3064
- grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t, grpc_chttp2_stream* s,
3065
- uint32_t frame_size, uint32_t flags) {
2952
+ grpc_chttp2_transport* t, grpc_chttp2_stream* s, uint32_t frame_size,
2953
+ uint32_t flags) {
3066
2954
  grpc_chttp2_incoming_byte_stream* incoming_byte_stream =
3067
2955
  (grpc_chttp2_incoming_byte_stream*)gpr_malloc(
3068
2956
  sizeof(*incoming_byte_stream));
@@ -3082,30 +2970,25 @@ grpc_chttp2_incoming_byte_stream* grpc_chttp2_incoming_byte_stream_create(
3082
2970
  * RESOURCE QUOTAS
3083
2971
  */
3084
2972
 
3085
- static void post_benign_reclaimer(grpc_exec_ctx* exec_ctx,
3086
- grpc_chttp2_transport* t) {
2973
+ static void post_benign_reclaimer(grpc_chttp2_transport* t) {
3087
2974
  if (!t->benign_reclaimer_registered) {
3088
2975
  t->benign_reclaimer_registered = true;
3089
2976
  GRPC_CHTTP2_REF_TRANSPORT(t, "benign_reclaimer");
3090
- grpc_resource_user_post_reclaimer(exec_ctx,
3091
- grpc_endpoint_get_resource_user(t->ep),
2977
+ grpc_resource_user_post_reclaimer(grpc_endpoint_get_resource_user(t->ep),
3092
2978
  false, &t->benign_reclaimer_locked);
3093
2979
  }
3094
2980
  }
3095
2981
 
3096
- static void post_destructive_reclaimer(grpc_exec_ctx* exec_ctx,
3097
- grpc_chttp2_transport* t) {
2982
+ static void post_destructive_reclaimer(grpc_chttp2_transport* t) {
3098
2983
  if (!t->destructive_reclaimer_registered) {
3099
2984
  t->destructive_reclaimer_registered = true;
3100
2985
  GRPC_CHTTP2_REF_TRANSPORT(t, "destructive_reclaimer");
3101
- grpc_resource_user_post_reclaimer(exec_ctx,
3102
- grpc_endpoint_get_resource_user(t->ep),
2986
+ grpc_resource_user_post_reclaimer(grpc_endpoint_get_resource_user(t->ep),
3103
2987
  true, &t->destructive_reclaimer_locked);
3104
2988
  }
3105
2989
  }
3106
2990
 
3107
- static void benign_reclaimer_locked(grpc_exec_ctx* exec_ctx, void* arg,
3108
- grpc_error* error) {
2991
+ static void benign_reclaimer_locked(void* arg, grpc_error* error) {
3109
2992
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)arg;
3110
2993
  if (error == GRPC_ERROR_NONE &&
3111
2994
  grpc_chttp2_stream_map_size(&t->stream_map) == 0) {
@@ -3115,7 +2998,7 @@ static void benign_reclaimer_locked(grpc_exec_ctx* exec_ctx, void* arg,
3115
2998
  gpr_log(GPR_DEBUG, "HTTP2: %s - send goaway to free memory",
3116
2999
  t->peer_string);
3117
3000
  }
3118
- send_goaway(exec_ctx, t,
3001
+ send_goaway(t,
3119
3002
  grpc_error_set_int(
3120
3003
  GRPC_ERROR_CREATE_FROM_STATIC_STRING("Buffers full"),
3121
3004
  GRPC_ERROR_INT_HTTP2_ERROR, GRPC_HTTP2_ENHANCE_YOUR_CALM));
@@ -3128,13 +3011,12 @@ static void benign_reclaimer_locked(grpc_exec_ctx* exec_ctx, void* arg,
3128
3011
  t->benign_reclaimer_registered = false;
3129
3012
  if (error != GRPC_ERROR_CANCELLED) {
3130
3013
  grpc_resource_user_finish_reclamation(
3131
- exec_ctx, grpc_endpoint_get_resource_user(t->ep));
3014
+ grpc_endpoint_get_resource_user(t->ep));
3132
3015
  }
3133
- GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "benign_reclaimer");
3016
+ GRPC_CHTTP2_UNREF_TRANSPORT(t, "benign_reclaimer");
3134
3017
  }
3135
3018
 
3136
- static void destructive_reclaimer_locked(grpc_exec_ctx* exec_ctx, void* arg,
3137
- grpc_error* error) {
3019
+ static void destructive_reclaimer_locked(void* arg, grpc_error* error) {
3138
3020
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)arg;
3139
3021
  size_t n = grpc_chttp2_stream_map_size(&t->stream_map);
3140
3022
  t->destructive_reclaimer_registered = false;
@@ -3146,7 +3028,7 @@ static void destructive_reclaimer_locked(grpc_exec_ctx* exec_ctx, void* arg,
3146
3028
  s->id);
3147
3029
  }
3148
3030
  grpc_chttp2_cancel_stream(
3149
- exec_ctx, t, s,
3031
+ t, s,
3150
3032
  grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING("Buffers full"),
3151
3033
  GRPC_ERROR_INT_HTTP2_ERROR,
3152
3034
  GRPC_HTTP2_ENHANCE_YOUR_CALM));
@@ -3155,14 +3037,14 @@ static void destructive_reclaimer_locked(grpc_exec_ctx* exec_ctx, void* arg,
3155
3037
  there are more streams left, we can immediately post a new
3156
3038
  reclaimer in case the resource quota needs to free more
3157
3039
  memory */
3158
- post_destructive_reclaimer(exec_ctx, t);
3040
+ post_destructive_reclaimer(t);
3159
3041
  }
3160
3042
  }
3161
3043
  if (error != GRPC_ERROR_CANCELLED) {
3162
3044
  grpc_resource_user_finish_reclamation(
3163
- exec_ctx, grpc_endpoint_get_resource_user(t->ep));
3045
+ grpc_endpoint_get_resource_user(t->ep));
3164
3046
  }
3165
- GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "destructive_reclaimer");
3047
+ GRPC_CHTTP2_UNREF_TRANSPORT(t, "destructive_reclaimer");
3166
3048
  }
3167
3049
 
3168
3050
  /*******************************************************************************
@@ -3216,8 +3098,7 @@ const char* grpc_chttp2_initiate_write_reason_string(
3216
3098
  GPR_UNREACHABLE_CODE(return "unknown");
3217
3099
  }
3218
3100
 
3219
- static grpc_endpoint* chttp2_get_endpoint(grpc_exec_ctx* exec_ctx,
3220
- grpc_transport* t) {
3101
+ static grpc_endpoint* chttp2_get_endpoint(grpc_transport* t) {
3221
3102
  return ((grpc_chttp2_transport*)t)->ep;
3222
3103
  }
3223
3104
 
@@ -3235,17 +3116,16 @@ static const grpc_transport_vtable vtable = {sizeof(grpc_chttp2_stream),
3235
3116
  static const grpc_transport_vtable* get_vtable(void) { return &vtable; }
3236
3117
 
3237
3118
  grpc_transport* grpc_create_chttp2_transport(
3238
- grpc_exec_ctx* exec_ctx, const grpc_channel_args* channel_args,
3239
- grpc_endpoint* ep, bool is_client) {
3119
+ const grpc_channel_args* channel_args, grpc_endpoint* ep, bool is_client) {
3240
3120
  grpc_chttp2_transport* t =
3241
3121
  (grpc_chttp2_transport*)gpr_zalloc(sizeof(grpc_chttp2_transport));
3242
- init_transport(exec_ctx, t, channel_args, ep, is_client);
3122
+ init_transport(t, channel_args, ep, is_client);
3243
3123
  return &t->base;
3244
3124
  }
3245
3125
 
3246
3126
  void grpc_chttp2_transport_start_reading(
3247
- grpc_exec_ctx* exec_ctx, grpc_transport* transport,
3248
- grpc_slice_buffer* read_buffer, grpc_closure* notify_on_receive_settings) {
3127
+ grpc_transport* transport, grpc_slice_buffer* read_buffer,
3128
+ grpc_closure* notify_on_receive_settings) {
3249
3129
  grpc_chttp2_transport* t = (grpc_chttp2_transport*)transport;
3250
3130
  GRPC_CHTTP2_REF_TRANSPORT(
3251
3131
  t, "reading_action"); /* matches unref inside reading_action */
@@ -3254,5 +3134,5 @@ void grpc_chttp2_transport_start_reading(
3254
3134
  gpr_free(read_buffer);
3255
3135
  }
3256
3136
  t->notify_on_receive_settings = notify_on_receive_settings;
3257
- GRPC_CLOSURE_SCHED(exec_ctx, &t->read_action_locked, GRPC_ERROR_NONE);
3137
+ GRPC_CLOSURE_SCHED(&t->read_action_locked, GRPC_ERROR_NONE);
3258
3138
  }