aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/node/ext/completion_queue_uv.cc
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2017-04-13 09:56:17 -0700
committerGravatar murgatroid99 <mlumish@google.com>2017-04-13 09:56:17 -0700
commita41fd5b0861f01a7be447eb3abfd903a6f623fa8 (patch)
treea2b268872d24c80fc894d0441a2e5af084c47209 /src/node/ext/completion_queue_uv.cc
parent4d0ee2a56b71b3eae4865c6440362daebba0b5f7 (diff)
parente48dd23092a58c76a1cb486846fbeea38f60af3e (diff)
Merge remote-tracking branch 'upstream/v1.2.x' into upmerge_1.2.4
Diffstat (limited to 'src/node/ext/completion_queue_uv.cc')
-rw-r--r--src/node/ext/completion_queue_uv.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/node/ext/completion_queue_uv.cc b/src/node/ext/completion_queue_uv.cc
index 615973a6c9..0f6f7da460 100644
--- a/src/node/ext/completion_queue_uv.cc
+++ b/src/node/ext/completion_queue_uv.cc
@@ -61,17 +61,13 @@ void drain_completion_queue(uv_prepare_t *handle) {
queue, gpr_inf_past(GPR_CLOCK_MONOTONIC), NULL);
if (event.type == GRPC_OP_COMPLETE) {
- Nan::Callback *callback = grpc::node::GetTagCallback(event.tag);
+ const char *error_message;
if (event.success) {
- Local<Value> argv[] = {Nan::Null(),
- grpc::node::GetTagNodeValue(event.tag)};
- callback->Call(2, argv);
+ error_message = NULL;
} else {
- Local<Value> argv[] = {Nan::Error(
- "The async function encountered an error")};
- callback->Call(1, argv);
+ error_message = "The async function encountered an error";
}
- grpc::node::CompleteTag(event.tag);
+ CompleteTag(event.tag, error_message);
grpc::node::DestroyTag(event.tag);
pending_batches--;
if (pending_batches == 0) {