From 7f09a13bbae62bbd9eb9df10d616974a8ed8c577 Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Mon, 11 Nov 2013 11:24:31 -0800 Subject: [PATCH] node: add HandleScope to prevent memory leak MakeCallback can only be called from a valid v8::HandleScope. Fixed #6487 --- src/node.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node.cc b/src/node.cc index 825b0227d4..3cb6a22a5f 100644 --- a/src/node.cc +++ b/src/node.cc @@ -182,6 +182,7 @@ void ArrayBufferAllocator::Free(void* data, size_t length) { static void CheckImmediate(uv_check_t* handle, int status) { + HandleScope scope(node_isolate); Environment* env = Environment::from_immediate_check_handle(handle); Context::Scope context_scope(env->context()); MakeCallback(env, env->process_object(), env->immediate_callback_string());