aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/node/ext
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2015-03-09 16:09:55 -0700
committerGravatar murgatroid99 <mlumish@google.com>2015-03-09 16:09:55 -0700
commite5f47064bf7f51d63d8538b9e5a3f5c7a741158a (patch)
treee6ecdb412c08284547ed5893b0984d17f51090ba /src/node/ext
parent6cbb237d61302da4236cd1a2517b3b1c82eb8d50 (diff)
Fixed segfault by fixing scope issue
Diffstat (limited to 'src/node/ext')
-rw-r--r--src/node/ext/byte_buffer.cc2
-rw-r--r--src/node/ext/completion_queue_async_worker.cc1
2 files changed, 1 insertions, 2 deletions
diff --git a/src/node/ext/byte_buffer.cc b/src/node/ext/byte_buffer.cc
index 5235c8e083..82b54b518c 100644
--- a/src/node/ext/byte_buffer.cc
+++ b/src/node/ext/byte_buffer.cc
@@ -65,7 +65,7 @@ grpc_byte_buffer *BufferToByteBuffer(Handle<Value> buffer) {
Handle<Value> ByteBufferToBuffer(grpc_byte_buffer *buffer) {
NanEscapableScope();
if (buffer == NULL) {
- return NanNull();
+ return NanEscapeScope(NanNull());
}
size_t length = grpc_byte_buffer_length(buffer);
char *result = reinterpret_cast<char *>(calloc(length, sizeof(char)));
diff --git a/src/node/ext/completion_queue_async_worker.cc b/src/node/ext/completion_queue_async_worker.cc
index ca22527e6f..cd7acd1d1b 100644
--- a/src/node/ext/completion_queue_async_worker.cc
+++ b/src/node/ext/completion_queue_async_worker.cc
@@ -80,7 +80,6 @@ void CompletionQueueAsyncWorker::HandleOKCallback() {
NanScope();
NanCallback *callback = GetTagCallback(result->tag);
Handle<Value> argv[] = {NanNull(), GetTagNodeValue(result->tag)};
-
callback->Call(2, argv);
DestroyTag(result->tag);