mirror of https://github.com/grpc/grpc-node.git
Fixed segfault by fixing scope issue
This commit is contained in:
parent
04e03be338
commit
b0910a21f5
|
@ -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)));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -81,7 +81,7 @@ describe('Math client', function() {
|
|||
done();
|
||||
});
|
||||
});
|
||||
it.only('should handle a client streaming request', function(done) {
|
||||
it('should handle a client streaming request', function(done) {
|
||||
var call = math_client.sum(function handleSumResult(err, value) {
|
||||
assert.ifError(err);
|
||||
assert.equal(value.num, 21);
|
||||
|
|
Loading…
Reference in New Issue