aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/filters/workarounds
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-12-06 09:05:05 -0800
committerGravatar GitHub <noreply@github.com>2017-12-06 09:05:05 -0800
commitad4d2dde0052efbbf49d64b0843c45f0381cfeb3 (patch)
tree6a657f8c6179d873b34505cdc24bce9462ca68eb /src/core/ext/filters/workarounds
parenta3df36cc2505a89c2f481eea4a66a87b3002844a (diff)
Revert "All instances of exec_ctx being passed around in src/core removed"
Diffstat (limited to 'src/core/ext/filters/workarounds')
-rw-r--r--src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc
index 555a9134a2..4ab1ee4e79 100644
--- a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc
+++ b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc
@@ -50,7 +50,8 @@ static bool get_user_agent_mdelem(const grpc_metadata_batch* batch,
}
// Callback invoked when we receive an initial metadata.
-static void recv_initial_metadata_ready(void* user_data, grpc_error* error) {
+static void recv_initial_metadata_ready(grpc_exec_ctx* exec_ctx,
+ void* user_data, grpc_error* error) {
grpc_call_element* elem = (grpc_call_element*)user_data;
call_data* calld = (call_data*)elem->call_data;
@@ -66,13 +67,14 @@ static void recv_initial_metadata_ready(void* user_data, grpc_error* error) {
}
// Invoke the next callback.
- GRPC_CLOSURE_RUN(calld->next_recv_initial_metadata_ready,
+ GRPC_CLOSURE_RUN(exec_ctx, calld->next_recv_initial_metadata_ready,
GRPC_ERROR_REF(error));
}
// Start transport stream op.
static void start_transport_stream_op_batch(
- grpc_call_element* elem, grpc_transport_stream_op_batch* op) {
+ grpc_exec_ctx* exec_ctx, grpc_call_element* elem,
+ grpc_transport_stream_op_batch* op) {
call_data* calld = (call_data*)elem->call_data;
// Inject callback for receiving initial metadata
@@ -94,11 +96,12 @@ static void start_transport_stream_op_batch(
}
// Chain to the next filter.
- grpc_call_next_op(elem, op);
+ grpc_call_next_op(exec_ctx, elem, op);
}
// Constructor for call_data.
-static grpc_error* init_call_elem(grpc_call_element* elem,
+static grpc_error* init_call_elem(grpc_exec_ctx* exec_ctx,
+ grpc_call_element* elem,
const grpc_call_element_args* args) {
call_data* calld = (call_data*)elem->call_data;
calld->next_recv_initial_metadata_ready = nullptr;
@@ -110,18 +113,20 @@ static grpc_error* init_call_elem(grpc_call_element* elem,
}
// Destructor for call_data.
-static void destroy_call_elem(grpc_call_element* elem,
+static void destroy_call_elem(grpc_exec_ctx* exec_ctx, grpc_call_element* elem,
const grpc_call_final_info* final_info,
grpc_closure* ignored) {}
// Constructor for channel_data.
-static grpc_error* init_channel_elem(grpc_channel_element* elem,
+static grpc_error* init_channel_elem(grpc_exec_ctx* exec_ctx,
+ grpc_channel_element* elem,
grpc_channel_element_args* args) {
return GRPC_ERROR_NONE;
}
// Destructor for channel_data.
-static void destroy_channel_elem(grpc_channel_element* elem) {}
+static void destroy_channel_elem(grpc_exec_ctx* exec_ctx,
+ grpc_channel_element* elem) {}
// Parse the user agent
static bool parse_user_agent(grpc_mdelem md) {
@@ -176,7 +181,7 @@ const grpc_channel_filter grpc_workaround_cronet_compression_filter = {
"workaround_cronet_compression"};
static bool register_workaround_cronet_compression(
- grpc_channel_stack_builder* builder, void* arg) {
+ grpc_exec_ctx* exec_ctx, grpc_channel_stack_builder* builder, void* arg) {
const grpc_channel_args* channel_args =
grpc_channel_stack_builder_get_channel_arguments(builder);
const grpc_arg* a = grpc_channel_args_find(