aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/node/ext/completion_queue_threadpool.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_threadpool.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_threadpool.cc')
-rw-r--r--src/node/ext/completion_queue_threadpool.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/node/ext/completion_queue_threadpool.cc b/src/node/ext/completion_queue_threadpool.cc
index 1917074dc2..7b1bdda033 100644
--- a/src/node/ext/completion_queue_threadpool.cc
+++ b/src/node/ext/completion_queue_threadpool.cc
@@ -148,9 +148,7 @@ void CompletionQueueAsyncWorker::HandleOKCallback() {
Nan::HandleScope scope;
current_threads -= 1;
TryAddWorker();
- Nan::Callback *callback = GetTagCallback(result.tag);
- Local<Value> argv[] = {Nan::Null(), GetTagNodeValue(result.tag)};
- callback->Call(2, argv);
+ CompleteTag(result.tag, NULL);
DestroyTag(result.tag);
}
@@ -159,10 +157,7 @@ void CompletionQueueAsyncWorker::HandleErrorCallback() {
Nan::HandleScope scope;
current_threads -= 1;
TryAddWorker();
- Nan::Callback *callback = GetTagCallback(result.tag);
- Local<Value> argv[] = {Nan::Error(ErrorMessage())};
-
- callback->Call(1, argv);
+ CompleteTag(result.tag, ErrorMessage());
DestroyTag(result.tag);
}