grpc 1.25.0 → 1.26.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of grpc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Makefile +782 -291
- data/include/grpc/impl/codegen/grpc_types.h +4 -0
- data/include/grpc/impl/codegen/port_platform.h +7 -0
- data/include/grpc/support/alloc.h +0 -16
- data/src/core/ext/filters/client_channel/backend_metric.cc +2 -2
- data/src/core/ext/filters/client_channel/backup_poller.cc +1 -1
- data/src/core/ext/filters/client_channel/channel_connectivity.cc +2 -2
- data/src/core/ext/filters/client_channel/client_channel.cc +95 -88
- data/src/core/ext/filters/client_channel/client_channel_channelz.cc +7 -7
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +4 -2
- data/src/core/ext/filters/client_channel/client_channel_factory.cc +1 -1
- data/src/core/ext/filters/client_channel/client_channel_plugin.cc +3 -3
- data/src/core/ext/filters/client_channel/connector.h +40 -45
- data/src/core/ext/filters/client_channel/global_subchannel_pool.cc +10 -10
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +16 -13
- data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +66 -37
- data/src/core/ext/filters/client_channel/http_proxy.cc +107 -116
- data/src/core/ext/filters/client_channel/http_proxy.h +5 -1
- data/src/core/ext/filters/client_channel/lb_policy.cc +3 -3
- data/src/core/ext/filters/client_channel/lb_policy.h +9 -5
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +10 -8
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +18 -19
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +4 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +4 -4
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +1 -1
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +6 -9
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +368 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +157 -77
- data/src/core/ext/filters/client_channel/lb_policy_registry.cc +5 -5
- data/src/core/ext/filters/client_channel/lb_policy_registry.h +1 -1
- data/src/core/ext/filters/client_channel/local_subchannel_pool.cc +8 -8
- data/src/core/ext/filters/client_channel/proxy_mapper.h +14 -34
- data/src/core/ext/filters/client_channel/proxy_mapper_registry.cc +46 -79
- data/src/core/ext/filters/client_channel/proxy_mapper_registry.h +23 -17
- data/src/core/ext/filters/client_channel/resolver.cc +2 -1
- data/src/core/ext/filters/client_channel/resolver.h +2 -2
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc +4 -4
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +13 -10
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +3 -2
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +9 -8
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +17 -16
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +2 -2
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc +4 -4
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +9 -9
- data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +5 -3
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver_factory.h +3 -3
- data/src/core/ext/filters/client_channel/resolver_registry.cc +14 -12
- data/src/core/ext/filters/client_channel/resolver_registry.h +6 -4
- data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +6 -6
- data/src/core/ext/filters/client_channel/resolver_result_parsing.h +6 -6
- data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +5 -5
- data/src/core/ext/filters/client_channel/resolving_lb_policy.h +3 -3
- data/src/core/ext/filters/client_channel/service_config.cc +15 -14
- data/src/core/ext/filters/client_channel/service_config.h +14 -19
- data/src/core/ext/filters/client_channel/subchannel.cc +38 -36
- data/src/core/ext/filters/client_channel/subchannel.h +11 -12
- data/src/core/ext/filters/client_channel/subchannel_interface.h +1 -1
- data/src/core/ext/filters/client_channel/xds/xds_api.cc +19 -9
- data/src/core/ext/filters/client_channel/xds/xds_api.h +19 -9
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc +3 -3
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.h +6 -5
- data/src/core/ext/filters/client_channel/xds/xds_client.cc +58 -31
- data/src/core/ext/filters/client_channel/xds/xds_client.h +20 -15
- data/src/core/ext/filters/client_channel/xds/xds_client_stats.cc +5 -3
- data/src/core/ext/filters/client_channel/xds/xds_client_stats.h +18 -15
- data/src/core/ext/filters/client_idle/client_idle_filter.cc +10 -10
- data/src/core/ext/filters/deadline/deadline_filter.cc +15 -13
- data/src/core/ext/filters/http/client/http_client_filter.cc +12 -12
- data/src/core/ext/filters/http/client_authority_filter.cc +3 -3
- data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +13 -7
- data/src/core/ext/filters/http/server/http_server_filter.cc +14 -13
- data/src/core/ext/filters/max_age/max_age_filter.cc +16 -14
- data/src/core/ext/filters/message_size/message_size_filter.cc +10 -8
- data/src/core/ext/filters/message_size/message_size_filter.h +1 -1
- data/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc +9 -8
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +141 -174
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +31 -1
- data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +7 -6
- data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +14 -12
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +8 -5
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +46 -38
- data/src/core/ext/transport/chttp2/transport/context_list.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/flow_control.h +0 -5
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +6 -7
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +4 -3
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +5 -5
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +11 -8
- data/src/core/ext/transport/chttp2/transport/internal.h +3 -3
- data/src/core/ext/transport/chttp2/transport/parsing.cc +4 -4
- data/src/core/ext/transport/chttp2/transport/writing.cc +3 -2
- data/src/core/ext/transport/inproc/inproc_transport.cc +65 -41
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +0 -1
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c +141 -70
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +352 -118
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +0 -1
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c +0 -1
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +8 -4
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +65 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +0 -1
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +16 -2
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +36 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +12 -5
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +34 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +1 -2
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +13 -12
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +28 -24
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +0 -1
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +5 -4
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +13 -0
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +0 -1
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c +23 -23
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +48 -44
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +0 -1
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +0 -1
- data/src/core/ext/upb-generated/envoy/type/http.upb.c +16 -0
- data/src/core/ext/upb-generated/envoy/type/http.upb.h +36 -0
- data/src/core/ext/upb-generated/envoy/type/percent.upb.c +0 -1
- data/src/core/ext/upb-generated/envoy/type/range.upb.c +0 -1
- data/src/core/lib/avl/avl.cc +1 -1
- data/src/core/lib/channel/channel_stack.cc +1 -1
- data/src/core/lib/channel/channel_stack.h +16 -4
- data/src/core/lib/channel/channel_trace.cc +4 -4
- data/src/core/lib/channel/channelz.cc +46 -46
- data/src/core/lib/channel/channelz.h +37 -35
- data/src/core/lib/channel/channelz_registry.cc +2 -2
- data/src/core/lib/channel/channelz_registry.h +1 -1
- data/src/core/lib/channel/connected_channel.cc +3 -2
- data/src/core/lib/channel/handshaker.cc +1 -1
- data/src/core/lib/channel/handshaker_registry.cc +5 -5
- data/src/core/lib/channel/handshaker_registry.h +3 -3
- data/src/core/lib/compression/message_compress.cc +3 -2
- data/src/core/lib/compression/stream_compression_identity.cc +5 -7
- data/src/core/lib/gpr/alloc.cc +4 -29
- data/src/core/lib/gpr/cpu_linux.cc +1 -1
- data/src/core/lib/gprpp/fork.cc +4 -4
- data/src/core/lib/gprpp/global_config_env.cc +7 -7
- data/src/core/lib/gprpp/global_config_env.h +2 -2
- data/src/core/lib/gprpp/host_port.cc +8 -8
- data/src/core/lib/gprpp/host_port.h +3 -3
- data/src/core/lib/gprpp/inlined_vector.h +13 -0
- data/src/core/lib/gprpp/map.h +2 -9
- data/src/core/lib/gprpp/memory.h +12 -98
- data/src/core/lib/gprpp/orphanable.h +3 -3
- data/src/core/lib/gprpp/ref_counted.h +3 -3
- data/src/core/lib/gprpp/ref_counted_ptr.h +1 -1
- data/src/core/lib/gprpp/string_view.h +45 -23
- data/src/core/lib/gprpp/thd.h +1 -1
- data/src/core/lib/gprpp/thd_posix.cc +6 -5
- data/src/core/lib/gprpp/thd_windows.cc +3 -3
- data/src/core/lib/http/httpcli.cc +1 -1
- data/src/core/lib/http/httpcli_security_connector.cc +3 -3
- data/src/core/lib/iomgr/buffer_list.cc +10 -5
- data/src/core/lib/iomgr/call_combiner.cc +7 -6
- data/src/core/lib/iomgr/call_combiner.h +4 -3
- data/src/core/lib/iomgr/cfstream_handle.cc +2 -2
- data/src/core/lib/iomgr/closure.h +33 -135
- data/src/core/lib/iomgr/combiner.cc +10 -17
- data/src/core/lib/iomgr/combiner.h +0 -2
- data/src/core/lib/iomgr/endpoint_cfstream.cc +2 -2
- data/src/core/lib/iomgr/endpoint_pair_posix.cc +1 -1
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +3 -2
- data/src/core/lib/iomgr/ev_epollex_linux.cc +23 -13
- data/src/core/lib/iomgr/ev_poll_posix.cc +30 -17
- data/src/core/lib/iomgr/exec_ctx.cc +52 -5
- data/src/core/lib/iomgr/exec_ctx.h +6 -2
- data/src/core/lib/iomgr/executor.cc +16 -37
- data/src/core/lib/iomgr/executor.h +4 -7
- data/src/core/lib/iomgr/executor/threadpool.cc +4 -4
- data/src/core/lib/iomgr/iomgr_custom.cc +1 -1
- data/src/core/lib/iomgr/lockfree_event.cc +9 -8
- data/src/core/lib/iomgr/logical_thread.cc +103 -0
- data/src/core/lib/iomgr/logical_thread.h +52 -0
- data/src/core/lib/iomgr/pollset_custom.cc +5 -5
- data/src/core/lib/iomgr/pollset_set_custom.cc +9 -9
- data/src/core/lib/iomgr/pollset_windows.cc +16 -2
- data/src/core/lib/iomgr/port.h +3 -0
- data/src/core/lib/iomgr/resolve_address_custom.cc +4 -4
- data/src/core/lib/iomgr/resolve_address_posix.cc +8 -9
- data/src/core/lib/iomgr/resolve_address_windows.cc +4 -6
- data/src/core/lib/iomgr/resource_quota.cc +26 -21
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +11 -0
- data/src/core/lib/iomgr/socket_windows.cc +2 -2
- data/src/core/lib/iomgr/tcp_client_cfstream.cc +2 -2
- data/src/core/lib/iomgr/tcp_client_custom.cc +2 -2
- data/src/core/lib/iomgr/tcp_client_posix.cc +5 -4
- data/src/core/lib/iomgr/tcp_client_windows.cc +2 -2
- data/src/core/lib/iomgr/tcp_custom.cc +10 -9
- data/src/core/lib/iomgr/tcp_posix.cc +19 -15
- data/src/core/lib/iomgr/tcp_server_custom.cc +3 -2
- data/src/core/lib/iomgr/tcp_server_posix.cc +5 -4
- data/src/core/lib/iomgr/tcp_server_windows.cc +5 -3
- data/src/core/lib/iomgr/tcp_windows.cc +16 -13
- data/src/core/lib/iomgr/timer_custom.cc +4 -3
- data/src/core/lib/iomgr/timer_generic.cc +11 -9
- data/src/core/lib/iomgr/udp_server.cc +16 -13
- data/src/core/lib/security/credentials/alts/alts_credentials.cc +8 -5
- data/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +45 -57
- data/src/core/lib/security/credentials/composite/composite_credentials.cc +7 -6
- data/src/core/lib/security/credentials/credentials.cc +8 -8
- data/src/core/lib/security/credentials/credentials.h +5 -5
- data/src/core/lib/security/credentials/fake/fake_credentials.cc +5 -5
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +1 -1
- data/src/core/lib/security/credentials/iam/iam_credentials.cc +4 -4
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +4 -4
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +2 -2
- data/src/core/lib/security/credentials/local/local_credentials.cc +3 -3
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +13 -11
- data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +6 -5
- data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +4 -4
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +5 -5
- data/src/core/lib/security/credentials/tls/spiffe_credentials.cc +2 -2
- data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +28 -22
- data/src/core/lib/security/security_connector/alts/alts_security_connector.h +5 -0
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +10 -10
- data/src/core/lib/security/security_connector/load_system_roots_linux.cc +2 -1
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +8 -8
- data/src/core/lib/security/security_connector/security_connector.h +1 -1
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +9 -9
- data/src/core/lib/security/security_connector/ssl_utils.cc +5 -4
- data/src/core/lib/security/security_connector/tls/spiffe_security_connector.cc +14 -15
- data/src/core/lib/security/transport/client_auth_filter.cc +4 -3
- data/src/core/lib/security/transport/secure_endpoint.cc +9 -8
- data/src/core/lib/security/transport/security_handshaker.cc +67 -23
- data/src/core/lib/security/transport/server_auth_filter.cc +6 -5
- data/src/core/lib/security/transport/target_authority_table.h +1 -1
- data/src/core/lib/slice/b64.cc +3 -4
- data/src/core/lib/slice/b64.h +1 -2
- data/src/core/lib/slice/slice.cc +8 -13
- data/src/core/lib/surface/call.cc +19 -19
- data/src/core/lib/surface/call.h +6 -7
- data/src/core/lib/surface/call_log_batch.cc +1 -2
- data/src/core/lib/surface/channel.cc +17 -18
- data/src/core/lib/surface/channel.h +4 -19
- data/src/core/lib/surface/channel_ping.cc +1 -1
- data/src/core/lib/surface/completion_queue.cc +21 -22
- data/src/core/lib/surface/completion_queue_factory.cc +1 -1
- data/src/core/lib/surface/init.cc +1 -1
- data/src/core/lib/surface/init_secure.cc +2 -2
- data/src/core/lib/surface/lame_client.cc +10 -12
- data/src/core/lib/surface/server.cc +24 -18
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/byte_stream.cc +2 -2
- data/src/core/lib/transport/byte_stream.h +2 -1
- data/src/core/lib/transport/connectivity_state.cc +4 -4
- data/src/core/lib/transport/connectivity_state.h +2 -2
- data/src/core/lib/transport/metadata.cc +8 -10
- data/src/core/lib/transport/metadata.h +5 -8
- data/src/core/lib/transport/metadata_batch.cc +6 -0
- data/src/core/lib/transport/static_metadata.cc +2 -4
- data/src/core/lib/transport/status_metadata.cc +7 -0
- data/src/core/lib/transport/status_metadata.h +18 -0
- data/src/core/lib/transport/transport.cc +9 -7
- data/src/core/plugin_registry/grpc_plugin_registry.cc +4 -0
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +292 -43
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +197 -46
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +4 -2
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h +5 -0
- data/src/core/tsi/ssl/session_cache/ssl_session.h +1 -1
- data/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc +1 -1
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +4 -4
- data/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +1 -1
- data/src/core/tsi/ssl_transport_security.cc +2 -1
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +0 -4
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +0 -6
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/third_party/upb/upb/decode.c +1 -0
- metadata +34 -32
- data/src/core/ext/filters/client_channel/connector.cc +0 -41
- data/src/core/ext/filters/client_channel/proxy_mapper.cc +0 -48
- data/src/core/lib/gprpp/set.h +0 -33
@@ -33,7 +33,7 @@ void ContextList::Append(ContextList** head, grpc_chttp2_stream* s) {
|
|
33
33
|
return;
|
34
34
|
}
|
35
35
|
/* Create a new element in the list and add it at the front */
|
36
|
-
ContextList* elem =
|
36
|
+
ContextList* elem = new ContextList();
|
37
37
|
elem->trace_context_ = get_copied_context_fn_g(s->context);
|
38
38
|
elem->byte_offset_ = s->byte_counter;
|
39
39
|
elem->next_ = *head;
|
@@ -53,7 +53,7 @@ void ContextList::Execute(void* arg, grpc_core::Timestamps* ts,
|
|
53
53
|
}
|
54
54
|
to_be_freed = head;
|
55
55
|
head = head->next_;
|
56
|
-
|
56
|
+
delete to_be_freed;
|
57
57
|
}
|
58
58
|
}
|
59
59
|
|
@@ -280,16 +280,12 @@ class TransportFlowControl final : public TransportFlowControlBase {
|
|
280
280
|
void PreUpdateAnnouncedWindowOverIncomingWindow(int64_t delta) {
|
281
281
|
if (delta > 0) {
|
282
282
|
announced_stream_total_over_incoming_window_ -= delta;
|
283
|
-
} else {
|
284
|
-
announced_stream_total_under_incoming_window_ += -delta;
|
285
283
|
}
|
286
284
|
}
|
287
285
|
|
288
286
|
void PostUpdateAnnouncedWindowOverIncomingWindow(int64_t delta) {
|
289
287
|
if (delta > 0) {
|
290
288
|
announced_stream_total_over_incoming_window_ += delta;
|
291
|
-
} else {
|
292
|
-
announced_stream_total_under_incoming_window_ -= -delta;
|
293
289
|
}
|
294
290
|
}
|
295
291
|
|
@@ -325,7 +321,6 @@ class TransportFlowControl final : public TransportFlowControlBase {
|
|
325
321
|
we want to adjust incoming_window such that:
|
326
322
|
incoming_window = total_over - max(bdp - total_under, 0) */
|
327
323
|
int64_t announced_stream_total_over_incoming_window_ = 0;
|
328
|
-
int64_t announced_stream_total_under_incoming_window_ = 0;
|
329
324
|
|
330
325
|
/** should we probe bdp? */
|
331
326
|
const bool enable_bdp_probe_;
|
@@ -40,10 +40,9 @@ grpc_chttp2_data_parser::~grpc_chttp2_data_parser() {
|
|
40
40
|
GRPC_ERROR_UNREF(error);
|
41
41
|
}
|
42
42
|
|
43
|
-
grpc_error* grpc_chttp2_data_parser_begin_frame(
|
44
|
-
|
45
|
-
|
46
|
-
grpc_chttp2_stream* s) {
|
43
|
+
grpc_error* grpc_chttp2_data_parser_begin_frame(
|
44
|
+
grpc_chttp2_data_parser* /*parser*/, uint8_t flags, uint32_t stream_id,
|
45
|
+
grpc_chttp2_stream* s) {
|
47
46
|
if (flags & ~GRPC_CHTTP2_DATA_FLAG_END_STREAM) {
|
48
47
|
char* msg;
|
49
48
|
gpr_asprintf(&msg, "unsupported data flags: 0x%02x", flags);
|
@@ -194,7 +193,7 @@ grpc_error* grpc_deframe_unprocessed_incoming_frames(
|
|
194
193
|
if (p->is_frame_compressed) {
|
195
194
|
message_flags |= GRPC_WRITE_INTERNAL_COMPRESS;
|
196
195
|
}
|
197
|
-
p->parsing_frame = grpc_core::
|
196
|
+
p->parsing_frame = new grpc_core::Chttp2IncomingByteStream(
|
198
197
|
t, s, p->frame_size, message_flags);
|
199
198
|
stream_out->reset(p->parsing_frame);
|
200
199
|
if (p->parsing_frame->remaining_bytes() == 0) {
|
@@ -279,7 +278,7 @@ grpc_error* grpc_deframe_unprocessed_incoming_frames(
|
|
279
278
|
return GRPC_ERROR_NONE;
|
280
279
|
}
|
281
280
|
|
282
|
-
grpc_error* grpc_chttp2_data_parser_parse(void* parser
|
281
|
+
grpc_error* grpc_chttp2_data_parser_parse(void* /*parser*/,
|
283
282
|
grpc_chttp2_transport* t,
|
284
283
|
grpc_chttp2_stream* s,
|
285
284
|
const grpc_slice& slice,
|
@@ -292,7 +291,7 @@ grpc_error* grpc_chttp2_data_parser_parse(void* parser,
|
|
292
291
|
GPR_ASSERT(s->frame_storage.length == 0);
|
293
292
|
grpc_slice_ref_internal(slice);
|
294
293
|
grpc_slice_buffer_add(&s->unprocessed_incoming_frames_buffer, slice);
|
295
|
-
|
294
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, s->on_next, GRPC_ERROR_NONE);
|
296
295
|
s->on_next = nullptr;
|
297
296
|
s->unprocessed_incoming_frames_decompressed = false;
|
298
297
|
} else {
|
@@ -37,7 +37,7 @@ void grpc_chttp2_goaway_parser_destroy(grpc_chttp2_goaway_parser* p) {
|
|
37
37
|
|
38
38
|
grpc_error* grpc_chttp2_goaway_parser_begin_frame(grpc_chttp2_goaway_parser* p,
|
39
39
|
uint32_t length,
|
40
|
-
uint8_t flags) {
|
40
|
+
uint8_t /*flags*/) {
|
41
41
|
if (length < 8) {
|
42
42
|
char* msg;
|
43
43
|
gpr_asprintf(&msg, "goaway frame too short (%d bytes)", length);
|
@@ -56,7 +56,7 @@ grpc_error* grpc_chttp2_goaway_parser_begin_frame(grpc_chttp2_goaway_parser* p,
|
|
56
56
|
|
57
57
|
grpc_error* grpc_chttp2_goaway_parser_parse(void* parser,
|
58
58
|
grpc_chttp2_transport* t,
|
59
|
-
grpc_chttp2_stream* s
|
59
|
+
grpc_chttp2_stream* /*s*/,
|
60
60
|
const grpc_slice& slice,
|
61
61
|
int is_last) {
|
62
62
|
const uint8_t* const beg = GRPC_SLICE_START_PTR(slice);
|
@@ -72,7 +72,7 @@ grpc_error* grpc_chttp2_ping_parser_begin_frame(grpc_chttp2_ping_parser* parser,
|
|
72
72
|
|
73
73
|
grpc_error* grpc_chttp2_ping_parser_parse(void* parser,
|
74
74
|
grpc_chttp2_transport* t,
|
75
|
-
grpc_chttp2_stream* s
|
75
|
+
grpc_chttp2_stream* /*s*/,
|
76
76
|
const grpc_slice& slice,
|
77
77
|
int is_last) {
|
78
78
|
const uint8_t* const beg = GRPC_SLICE_START_PTR(slice);
|
@@ -110,7 +110,7 @@ grpc_error* grpc_chttp2_settings_parser_begin_frame(
|
|
110
110
|
}
|
111
111
|
|
112
112
|
grpc_error* grpc_chttp2_settings_parser_parse(void* p, grpc_chttp2_transport* t,
|
113
|
-
grpc_chttp2_stream* s
|
113
|
+
grpc_chttp2_stream* /*s*/,
|
114
114
|
const grpc_slice& slice,
|
115
115
|
int is_last) {
|
116
116
|
grpc_chttp2_settings_parser* parser =
|
@@ -135,8 +135,9 @@ grpc_error* grpc_chttp2_settings_parser_parse(void* p, grpc_chttp2_transport* t,
|
|
135
135
|
t->num_pending_induced_frames++;
|
136
136
|
grpc_slice_buffer_add(&t->qbuf, grpc_chttp2_settings_ack_create());
|
137
137
|
if (t->notify_on_receive_settings != nullptr) {
|
138
|
-
|
139
|
-
|
138
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION,
|
139
|
+
t->notify_on_receive_settings,
|
140
|
+
GRPC_ERROR_NONE);
|
140
141
|
t->notify_on_receive_settings = nullptr;
|
141
142
|
}
|
142
143
|
}
|
@@ -224,7 +224,7 @@ static void UpdateAddOrEvict(Hashtable hashtable, const ValueType& value,
|
|
224
224
|
}
|
225
225
|
|
226
226
|
/* halve all counts because an element reached max */
|
227
|
-
static void HalveFilter(uint8_t idx
|
227
|
+
static void HalveFilter(uint8_t /*idx*/, uint32_t* sum, uint8_t* elems) {
|
228
228
|
*sum = 0;
|
229
229
|
for (int i = 0; i < GRPC_CHTTP2_HPACKC_NUM_VALUES; i++) {
|
230
230
|
elems[i] /= 2;
|
@@ -452,8 +452,8 @@ static void add_key(grpc_chttp2_hpack_compressor* c, grpc_mdelem elem,
|
|
452
452
|
}
|
453
453
|
}
|
454
454
|
|
455
|
-
static void emit_indexed(grpc_chttp2_hpack_compressor* c
|
456
|
-
framer_state* st) {
|
455
|
+
static void emit_indexed(grpc_chttp2_hpack_compressor* /*c*/,
|
456
|
+
uint32_t elem_index, framer_state* st) {
|
457
457
|
GRPC_STATS_INC_HPACK_SEND_INDEXED();
|
458
458
|
uint32_t len = GRPC_CHTTP2_VARINT_LENGTH(elem_index, 1);
|
459
459
|
GRPC_CHTTP2_WRITE_VARINT(elem_index, 1, 0x80, add_tiny_header_data(st, len),
|
@@ -511,7 +511,7 @@ enum class EmitLitHdrVType { INC_IDX_V, NO_IDX_V };
|
|
511
511
|
} // namespace
|
512
512
|
|
513
513
|
template <EmitLitHdrType type>
|
514
|
-
static void emit_lithdr(grpc_chttp2_hpack_compressor* c
|
514
|
+
static void emit_lithdr(grpc_chttp2_hpack_compressor* /*c*/, uint32_t key_index,
|
515
515
|
grpc_mdelem elem, framer_state* st) {
|
516
516
|
switch (type) {
|
517
517
|
case EmitLitHdrType::INC_IDX:
|
@@ -549,7 +549,7 @@ static void emit_lithdr(grpc_chttp2_hpack_compressor* c, uint32_t key_index,
|
|
549
549
|
}
|
550
550
|
|
551
551
|
template <EmitLitHdrVType type>
|
552
|
-
static void emit_lithdr_v(grpc_chttp2_hpack_compressor* c
|
552
|
+
static void emit_lithdr_v(grpc_chttp2_hpack_compressor* /*c*/, grpc_mdelem elem,
|
553
553
|
framer_state* st) {
|
554
554
|
switch (type) {
|
555
555
|
case EmitLitHdrVType::INC_IDX_V:
|
@@ -659,7 +659,7 @@ static grpc_error* on_hdr(grpc_chttp2_hpack_parser* p, grpc_mdelem md) {
|
|
659
659
|
}
|
660
660
|
|
661
661
|
static grpc_core::UnmanagedMemorySlice take_string_extern(
|
662
|
-
grpc_chttp2_hpack_parser* p
|
662
|
+
grpc_chttp2_hpack_parser* /*p*/, grpc_chttp2_hpack_parser_string* str) {
|
663
663
|
grpc_core::UnmanagedMemorySlice s;
|
664
664
|
if (!str->copied) {
|
665
665
|
GPR_DEBUG_ASSERT(!grpc_slice_is_interned(str->data.referenced));
|
@@ -675,7 +675,7 @@ static grpc_core::UnmanagedMemorySlice take_string_extern(
|
|
675
675
|
}
|
676
676
|
|
677
677
|
static grpc_core::ManagedMemorySlice take_string_intern(
|
678
|
-
grpc_chttp2_hpack_parser* p
|
678
|
+
grpc_chttp2_hpack_parser* /*p*/, grpc_chttp2_hpack_parser_string* str) {
|
679
679
|
grpc_core::ManagedMemorySlice s;
|
680
680
|
if (!str->copied) {
|
681
681
|
s = grpc_core::ManagedMemorySlice(&str->data.referenced);
|
@@ -1067,8 +1067,9 @@ static grpc_error* parse_max_tbl_size_x(grpc_chttp2_hpack_parser* p,
|
|
1067
1067
|
}
|
1068
1068
|
|
1069
1069
|
/* a parse error: jam the parse state into parse_error, and return error */
|
1070
|
-
static grpc_error* parse_error(grpc_chttp2_hpack_parser* p,
|
1071
|
-
const uint8_t*
|
1070
|
+
static grpc_error* parse_error(grpc_chttp2_hpack_parser* p,
|
1071
|
+
const uint8_t* /*cur*/, const uint8_t* /*end*/,
|
1072
|
+
grpc_error* err) {
|
1072
1073
|
GPR_ASSERT(err != GRPC_ERROR_NONE);
|
1073
1074
|
if (p->last_error == GRPC_ERROR_NONE) {
|
1074
1075
|
p->last_error = GRPC_ERROR_REF(err);
|
@@ -1078,7 +1079,8 @@ static grpc_error* parse_error(grpc_chttp2_hpack_parser* p, const uint8_t* cur,
|
|
1078
1079
|
}
|
1079
1080
|
|
1080
1081
|
static grpc_error* still_parse_error(grpc_chttp2_hpack_parser* p,
|
1081
|
-
const uint8_t* cur
|
1082
|
+
const uint8_t* /*cur*/,
|
1083
|
+
const uint8_t* /*end*/) {
|
1082
1084
|
return GRPC_ERROR_REF(p->last_error);
|
1083
1085
|
}
|
1084
1086
|
|
@@ -1593,7 +1595,8 @@ static grpc_error* parse_value_string_with_literal_key(
|
|
1593
1595
|
}
|
1594
1596
|
|
1595
1597
|
/* "Uninitialized" header parser to save us a branch in on_hdr(). */
|
1596
|
-
static grpc_error* on_header_uninitialized(void* user_data
|
1598
|
+
static grpc_error* on_header_uninitialized(void* /*user_data*/,
|
1599
|
+
grpc_mdelem md) {
|
1597
1600
|
GRPC_MDELEM_UNREF(md);
|
1598
1601
|
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("on_header callback not set");
|
1599
1602
|
}
|
@@ -1666,7 +1669,7 @@ static const maybe_complete_func_type maybe_complete_funcs[] = {
|
|
1666
1669
|
grpc_chttp2_maybe_complete_recv_initial_metadata,
|
1667
1670
|
grpc_chttp2_maybe_complete_recv_trailing_metadata};
|
1668
1671
|
|
1669
|
-
static void force_client_rst_stream(void* sp, grpc_error* error) {
|
1672
|
+
static void force_client_rst_stream(void* sp, grpc_error* /*error*/) {
|
1670
1673
|
grpc_chttp2_stream* s = static_cast<grpc_chttp2_stream*>(sp);
|
1671
1674
|
grpc_chttp2_transport* t = s->t;
|
1672
1675
|
if (!s->write_closed) {
|
@@ -1678,7 +1681,7 @@ static void force_client_rst_stream(void* sp, grpc_error* error) {
|
|
1678
1681
|
GRPC_CHTTP2_STREAM_UNREF(s, "final_rst");
|
1679
1682
|
}
|
1680
1683
|
|
1681
|
-
static void parse_stream_compression_md(grpc_chttp2_transport* t
|
1684
|
+
static void parse_stream_compression_md(grpc_chttp2_transport* /*t*/,
|
1682
1685
|
grpc_chttp2_stream* s,
|
1683
1686
|
grpc_metadata_batch* initial_metadata) {
|
1684
1687
|
if (initial_metadata->idx.named.content_encoding == nullptr ||
|
@@ -239,7 +239,7 @@ class Chttp2IncomingByteStream : public ByteStream {
|
|
239
239
|
void Ref() { refs_.Ref(); }
|
240
240
|
void Unref() {
|
241
241
|
if (GPR_UNLIKELY(refs_.Unref())) {
|
242
|
-
|
242
|
+
delete this;
|
243
243
|
}
|
244
244
|
}
|
245
245
|
|
@@ -814,7 +814,7 @@ inline void grpc_chttp2_unref_transport(grpc_chttp2_transport* t,
|
|
814
814
|
const char* reason, const char* file,
|
815
815
|
int line) {
|
816
816
|
if (t->refs.Unref(grpc_core::DebugLocation(file, line), reason)) {
|
817
|
-
|
817
|
+
delete t;
|
818
818
|
}
|
819
819
|
}
|
820
820
|
inline void grpc_chttp2_ref_transport(grpc_chttp2_transport* t,
|
@@ -827,7 +827,7 @@ inline void grpc_chttp2_ref_transport(grpc_chttp2_transport* t,
|
|
827
827
|
#define GRPC_CHTTP2_UNREF_TRANSPORT(t, r) grpc_chttp2_unref_transport(t)
|
828
828
|
inline void grpc_chttp2_unref_transport(grpc_chttp2_transport* t) {
|
829
829
|
if (t->refs.Unref()) {
|
830
|
-
|
830
|
+
delete t;
|
831
831
|
}
|
832
832
|
}
|
833
833
|
inline void grpc_chttp2_ref_transport(grpc_chttp2_transport* t) {
|
@@ -312,13 +312,13 @@ static grpc_error* init_frame_parser(grpc_chttp2_transport* t) {
|
|
312
312
|
}
|
313
313
|
}
|
314
314
|
|
315
|
-
static grpc_error* skip_parser(void* parser
|
316
|
-
grpc_chttp2_stream* s
|
317
|
-
int is_last) {
|
315
|
+
static grpc_error* skip_parser(void* /*parser*/, grpc_chttp2_transport* /*t*/,
|
316
|
+
grpc_chttp2_stream* /*s*/,
|
317
|
+
const grpc_slice& /*slice*/, int /*is_last*/) {
|
318
318
|
return GRPC_ERROR_NONE;
|
319
319
|
}
|
320
320
|
|
321
|
-
static grpc_error* skip_header(void* tp
|
321
|
+
static grpc_error* skip_header(void* /*tp*/, grpc_mdelem md) {
|
322
322
|
GRPC_MDELEM_UNREF(md);
|
323
323
|
return GRPC_ERROR_NONE;
|
324
324
|
}
|
@@ -107,7 +107,8 @@ static void maybe_initiate_ping(grpc_chttp2_transport* t) {
|
|
107
107
|
|
108
108
|
pq->inflight_id = t->ping_ctr;
|
109
109
|
t->ping_ctr++;
|
110
|
-
|
110
|
+
grpc_core::ExecCtx::RunList(DEBUG_LOCATION,
|
111
|
+
&pq->lists[GRPC_CHTTP2_PCL_INITIATE]);
|
111
112
|
grpc_closure_list_move(&pq->lists[GRPC_CHTTP2_PCL_NEXT],
|
112
113
|
&pq->lists[GRPC_CHTTP2_PCL_INFLIGHT]);
|
113
114
|
grpc_slice_buffer_add(&t->outbuf,
|
@@ -176,7 +177,7 @@ static void report_stall(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
|
|
176
177
|
}
|
177
178
|
|
178
179
|
/* How many bytes would we like to put on the wire during a single syscall */
|
179
|
-
static uint32_t target_write_size(grpc_chttp2_transport* t) {
|
180
|
+
static uint32_t target_write_size(grpc_chttp2_transport* /*t*/) {
|
180
181
|
return 1024 * 1024;
|
181
182
|
}
|
182
183
|
|
@@ -204,7 +204,8 @@ struct inproc_stream {
|
|
204
204
|
t->unref();
|
205
205
|
|
206
206
|
if (closure_at_destroy) {
|
207
|
-
|
207
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure_at_destroy,
|
208
|
+
GRPC_ERROR_NONE);
|
208
209
|
}
|
209
210
|
}
|
210
211
|
|
@@ -390,13 +391,15 @@ void complete_if_batch_end_locked(inproc_stream* s, grpc_error* error,
|
|
390
391
|
|
391
392
|
if ((is_sm + is_stm + is_rim + is_rm + is_rtm) == 1) {
|
392
393
|
INPROC_LOG(GPR_INFO, "%s %p %p %p", msg, s, op, error);
|
393
|
-
|
394
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, op->on_complete,
|
395
|
+
GRPC_ERROR_REF(error));
|
394
396
|
}
|
395
397
|
}
|
396
398
|
|
397
399
|
void maybe_schedule_op_closure_locked(inproc_stream* s, grpc_error* error) {
|
398
400
|
if (s && s->ops_needed && !s->op_closure_scheduled) {
|
399
|
-
|
401
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, &s->op_closure,
|
402
|
+
GRPC_ERROR_REF(error));
|
400
403
|
s->op_closure_scheduled = true;
|
401
404
|
s->ops_needed = false;
|
402
405
|
}
|
@@ -471,9 +474,11 @@ void fail_helper_locked(inproc_stream* s, grpc_error* error) {
|
|
471
474
|
INPROC_LOG(GPR_INFO,
|
472
475
|
"fail_helper %p scheduling initial-metadata-ready %p %p", s,
|
473
476
|
error, err);
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
+
grpc_core::ExecCtx::Run(
|
478
|
+
DEBUG_LOCATION,
|
479
|
+
s->recv_initial_md_op->payload->recv_initial_metadata
|
480
|
+
.recv_initial_metadata_ready,
|
481
|
+
err);
|
477
482
|
// Last use of err so no need to REF and then UNREF it
|
478
483
|
|
479
484
|
complete_if_batch_end_locked(
|
@@ -484,7 +489,8 @@ void fail_helper_locked(inproc_stream* s, grpc_error* error) {
|
|
484
489
|
if (s->recv_message_op) {
|
485
490
|
INPROC_LOG(GPR_INFO, "fail_helper %p scheduling message-ready %p", s,
|
486
491
|
error);
|
487
|
-
|
492
|
+
grpc_core::ExecCtx::Run(
|
493
|
+
DEBUG_LOCATION,
|
488
494
|
s->recv_message_op->payload->recv_message.recv_message_ready,
|
489
495
|
GRPC_ERROR_REF(error));
|
490
496
|
complete_if_batch_end_locked(
|
@@ -508,9 +514,11 @@ void fail_helper_locked(inproc_stream* s, grpc_error* error) {
|
|
508
514
|
if (s->recv_trailing_md_op) {
|
509
515
|
INPROC_LOG(GPR_INFO, "fail_helper %p scheduling trailing-metadata-ready %p",
|
510
516
|
s, error);
|
511
|
-
|
512
|
-
|
513
|
-
|
517
|
+
grpc_core::ExecCtx::Run(
|
518
|
+
DEBUG_LOCATION,
|
519
|
+
s->recv_trailing_md_op->payload->recv_trailing_metadata
|
520
|
+
.recv_trailing_metadata_ready,
|
521
|
+
GRPC_ERROR_REF(error));
|
514
522
|
INPROC_LOG(GPR_INFO, "fail_helper %p scheduling trailing-md-on-complete %p",
|
515
523
|
s, error);
|
516
524
|
complete_if_batch_end_locked(
|
@@ -564,7 +572,8 @@ void message_transfer_locked(inproc_stream* sender, inproc_stream* receiver) {
|
|
564
572
|
receiver->recv_stream.get());
|
565
573
|
INPROC_LOG(GPR_INFO, "message_transfer_locked %p scheduling message-ready",
|
566
574
|
receiver);
|
567
|
-
|
575
|
+
grpc_core::ExecCtx::Run(
|
576
|
+
DEBUG_LOCATION,
|
568
577
|
receiver->recv_message_op->payload->recv_message.recv_message_ready,
|
569
578
|
GRPC_ERROR_NONE);
|
570
579
|
complete_if_batch_end_locked(
|
@@ -656,14 +665,16 @@ void op_state_machine(void* arg, grpc_error* error) {
|
|
656
665
|
if (!s->t->is_client && s->trailing_md_recvd && s->recv_trailing_md_op) {
|
657
666
|
INPROC_LOG(GPR_INFO,
|
658
667
|
"op_state_machine %p scheduling trailing-metadata-ready", s);
|
659
|
-
|
668
|
+
grpc_core::ExecCtx::Run(
|
669
|
+
DEBUG_LOCATION,
|
660
670
|
s->recv_trailing_md_op->payload->recv_trailing_metadata
|
661
671
|
.recv_trailing_metadata_ready,
|
662
672
|
GRPC_ERROR_NONE);
|
663
673
|
INPROC_LOG(GPR_INFO,
|
664
674
|
"op_state_machine %p scheduling trailing-md-on-complete", s);
|
665
|
-
|
666
|
-
|
675
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION,
|
676
|
+
s->recv_trailing_md_op->on_complete,
|
677
|
+
GRPC_ERROR_NONE);
|
667
678
|
s->recv_trailing_md_op = nullptr;
|
668
679
|
needs_close = true;
|
669
680
|
}
|
@@ -708,9 +719,11 @@ void op_state_machine(void* arg, grpc_error* error) {
|
|
708
719
|
INPROC_LOG(GPR_INFO,
|
709
720
|
"op_state_machine %p scheduling initial-metadata-ready %p", s,
|
710
721
|
new_err);
|
711
|
-
|
712
|
-
|
713
|
-
|
722
|
+
grpc_core::ExecCtx::Run(
|
723
|
+
DEBUG_LOCATION,
|
724
|
+
s->recv_initial_md_op->payload->recv_initial_metadata
|
725
|
+
.recv_initial_metadata_ready,
|
726
|
+
GRPC_ERROR_REF(new_err));
|
714
727
|
complete_if_batch_end_locked(
|
715
728
|
s, new_err, s->recv_initial_md_op,
|
716
729
|
"op_state_machine scheduling recv-initial-metadata-on-complete");
|
@@ -748,7 +761,8 @@ void op_state_machine(void* arg, grpc_error* error) {
|
|
748
761
|
// satisfied
|
749
762
|
*s->recv_message_op->payload->recv_message.recv_message = nullptr;
|
750
763
|
INPROC_LOG(GPR_INFO, "op_state_machine %p scheduling message-ready", s);
|
751
|
-
|
764
|
+
grpc_core::ExecCtx::Run(
|
765
|
+
DEBUG_LOCATION,
|
752
766
|
s->recv_message_op->payload->recv_message.recv_message_ready,
|
753
767
|
GRPC_ERROR_NONE);
|
754
768
|
complete_if_batch_end_locked(
|
@@ -785,12 +799,14 @@ void op_state_machine(void* arg, grpc_error* error) {
|
|
785
799
|
INPROC_LOG(GPR_INFO,
|
786
800
|
"op_state_machine %p scheduling trailing-md-on-complete %p",
|
787
801
|
s, new_err);
|
788
|
-
|
802
|
+
grpc_core::ExecCtx::Run(
|
803
|
+
DEBUG_LOCATION,
|
789
804
|
s->recv_trailing_md_op->payload->recv_trailing_metadata
|
790
805
|
.recv_trailing_metadata_ready,
|
791
806
|
GRPC_ERROR_REF(new_err));
|
792
|
-
|
793
|
-
|
807
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION,
|
808
|
+
s->recv_trailing_md_op->on_complete,
|
809
|
+
GRPC_ERROR_REF(new_err));
|
794
810
|
s->recv_trailing_md_op = nullptr;
|
795
811
|
needs_close = true;
|
796
812
|
} else {
|
@@ -810,7 +826,8 @@ void op_state_machine(void* arg, grpc_error* error) {
|
|
810
826
|
// recv_message_op
|
811
827
|
INPROC_LOG(GPR_INFO, "op_state_machine %p scheduling message-ready", s);
|
812
828
|
*s->recv_message_op->payload->recv_message.recv_message = nullptr;
|
813
|
-
|
829
|
+
grpc_core::ExecCtx::Run(
|
830
|
+
DEBUG_LOCATION,
|
814
831
|
s->recv_message_op->payload->recv_message.recv_message_ready,
|
815
832
|
GRPC_ERROR_NONE);
|
816
833
|
complete_if_batch_end_locked(
|
@@ -883,9 +900,11 @@ bool cancel_stream_locked(inproc_stream* s, grpc_error* error) {
|
|
883
900
|
// couldn't complete that because we hadn't yet sent out trailing
|
884
901
|
// md, now's the chance
|
885
902
|
if (!s->t->is_client && s->trailing_md_recvd && s->recv_trailing_md_op) {
|
886
|
-
|
887
|
-
|
888
|
-
|
903
|
+
grpc_core::ExecCtx::Run(
|
904
|
+
DEBUG_LOCATION,
|
905
|
+
s->recv_trailing_md_op->payload->recv_trailing_metadata
|
906
|
+
.recv_trailing_metadata_ready,
|
907
|
+
GRPC_ERROR_REF(s->cancel_self_error));
|
889
908
|
complete_if_batch_end_locked(
|
890
909
|
s, s->cancel_self_error, s->recv_trailing_md_op,
|
891
910
|
"cancel_stream scheduling trailing-md-on-complete");
|
@@ -900,7 +919,7 @@ bool cancel_stream_locked(inproc_stream* s, grpc_error* error) {
|
|
900
919
|
return ret;
|
901
920
|
}
|
902
921
|
|
903
|
-
void do_nothing(void* arg
|
922
|
+
void do_nothing(void* /*arg*/, grpc_error* /*error*/) {}
|
904
923
|
|
905
924
|
void perform_stream_op(grpc_transport* gt, grpc_stream* gs,
|
906
925
|
grpc_transport_stream_op_batch* op) {
|
@@ -1026,7 +1045,8 @@ void perform_stream_op(grpc_transport* gt, grpc_stream* gs,
|
|
1026
1045
|
(op->recv_message && other && other->send_message_op != nullptr) ||
|
1027
1046
|
(s->to_read_trailing_md_filled || s->trailing_md_recvd)) {
|
1028
1047
|
if (!s->op_closure_scheduled) {
|
1029
|
-
|
1048
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, &s->op_closure,
|
1049
|
+
GRPC_ERROR_NONE);
|
1030
1050
|
s->op_closure_scheduled = true;
|
1031
1051
|
}
|
1032
1052
|
} else {
|
@@ -1054,7 +1074,8 @@ void perform_stream_op(grpc_transport* gt, grpc_stream* gs,
|
|
1054
1074
|
GPR_INFO,
|
1055
1075
|
"perform_stream_op error %p scheduling initial-metadata-ready %p",
|
1056
1076
|
s, error);
|
1057
|
-
|
1077
|
+
grpc_core::ExecCtx::Run(
|
1078
|
+
DEBUG_LOCATION,
|
1058
1079
|
op->payload->recv_initial_metadata.recv_initial_metadata_ready,
|
1059
1080
|
GRPC_ERROR_REF(error));
|
1060
1081
|
}
|
@@ -1063,22 +1084,24 @@ void perform_stream_op(grpc_transport* gt, grpc_stream* gs,
|
|
1063
1084
|
GPR_INFO,
|
1064
1085
|
"perform_stream_op error %p scheduling recv message-ready %p", s,
|
1065
1086
|
error);
|
1066
|
-
|
1067
|
-
|
1087
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION,
|
1088
|
+
op->payload->recv_message.recv_message_ready,
|
1089
|
+
GRPC_ERROR_REF(error));
|
1068
1090
|
}
|
1069
1091
|
if (op->recv_trailing_metadata) {
|
1070
1092
|
INPROC_LOG(
|
1071
1093
|
GPR_INFO,
|
1072
1094
|
"perform_stream_op error %p scheduling trailing-metadata-ready %p",
|
1073
1095
|
s, error);
|
1074
|
-
|
1096
|
+
grpc_core::ExecCtx::Run(
|
1097
|
+
DEBUG_LOCATION,
|
1075
1098
|
op->payload->recv_trailing_metadata.recv_trailing_metadata_ready,
|
1076
1099
|
GRPC_ERROR_REF(error));
|
1077
1100
|
}
|
1078
1101
|
}
|
1079
1102
|
INPROC_LOG(GPR_INFO, "perform_stream_op %p scheduling on_complete %p", s,
|
1080
1103
|
error);
|
1081
|
-
|
1104
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, on_complete, GRPC_ERROR_REF(error));
|
1082
1105
|
}
|
1083
1106
|
if (needs_close) {
|
1084
1107
|
close_other_side_locked(s, "perform_stream_op:other_side");
|
@@ -1121,7 +1144,7 @@ void perform_transport_op(grpc_transport* gt, grpc_transport_op* op) {
|
|
1121
1144
|
t->accept_stream_data = op->set_accept_stream_user_data;
|
1122
1145
|
}
|
1123
1146
|
if (op->on_consumed) {
|
1124
|
-
|
1147
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, op->on_consumed, GRPC_ERROR_NONE);
|
1125
1148
|
}
|
1126
1149
|
|
1127
1150
|
bool do_close = false;
|
@@ -1140,7 +1163,7 @@ void perform_transport_op(grpc_transport* gt, grpc_transport_op* op) {
|
|
1140
1163
|
gpr_mu_unlock(&t->mu->mu);
|
1141
1164
|
}
|
1142
1165
|
|
1143
|
-
void destroy_stream(grpc_transport* gt
|
1166
|
+
void destroy_stream(grpc_transport* /*gt*/, grpc_stream* gs,
|
1144
1167
|
grpc_closure* then_schedule_closure) {
|
1145
1168
|
INPROC_LOG(GPR_INFO, "destroy_stream %p %p", gs, then_schedule_closure);
|
1146
1169
|
inproc_stream* s = reinterpret_cast<inproc_stream*>(gs);
|
@@ -1162,16 +1185,17 @@ void destroy_transport(grpc_transport* gt) {
|
|
1162
1185
|
* INTEGRATION GLUE
|
1163
1186
|
*/
|
1164
1187
|
|
1165
|
-
void set_pollset(grpc_transport* gt
|
1188
|
+
void set_pollset(grpc_transport* /*gt*/, grpc_stream* /*gs*/,
|
1189
|
+
grpc_pollset* /*pollset*/) {
|
1166
1190
|
// Nothing to do here
|
1167
1191
|
}
|
1168
1192
|
|
1169
|
-
void set_pollset_set(grpc_transport* gt
|
1170
|
-
grpc_pollset_set* pollset_set) {
|
1193
|
+
void set_pollset_set(grpc_transport* /*gt*/, grpc_stream* /*gs*/,
|
1194
|
+
grpc_pollset_set* /*pollset_set*/) {
|
1171
1195
|
// Nothing to do here
|
1172
1196
|
}
|
1173
1197
|
|
1174
|
-
grpc_endpoint* get_endpoint(grpc_transport* t) { return nullptr; }
|
1198
|
+
grpc_endpoint* get_endpoint(grpc_transport* /*t*/) { return nullptr; }
|
1175
1199
|
|
1176
1200
|
const grpc_transport_vtable inproc_vtable = {
|
1177
1201
|
sizeof(inproc_stream), "inproc", init_stream,
|
@@ -1183,9 +1207,9 @@ const grpc_transport_vtable inproc_vtable = {
|
|
1183
1207
|
* Main inproc transport functions
|
1184
1208
|
*/
|
1185
1209
|
void inproc_transports_create(grpc_transport** server_transport,
|
1186
|
-
const grpc_channel_args* server_args
|
1210
|
+
const grpc_channel_args* /*server_args*/,
|
1187
1211
|
grpc_transport** client_transport,
|
1188
|
-
const grpc_channel_args* client_args) {
|
1212
|
+
const grpc_channel_args* /*client_args*/) {
|
1189
1213
|
INPROC_LOG(GPR_INFO, "inproc_transports_create");
|
1190
1214
|
shared_mu* mu = new (gpr_malloc(sizeof(*mu))) shared_mu();
|
1191
1215
|
inproc_transport* st = new (gpr_malloc(sizeof(*st)))
|
@@ -1221,7 +1245,7 @@ void grpc_inproc_transport_init(void) {
|
|
1221
1245
|
|
1222
1246
|
grpc_channel* grpc_inproc_channel_create(grpc_server* server,
|
1223
1247
|
grpc_channel_args* args,
|
1224
|
-
void* reserved) {
|
1248
|
+
void* /*reserved*/) {
|
1225
1249
|
GRPC_API_TRACE("grpc_inproc_channel_create(server=%p, args=%p)", 2,
|
1226
1250
|
(server, args));
|
1227
1251
|
|