aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/node/ext/completion_queue_threadpool.cc
diff options
context:
space:
mode:
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);
}