node: add HandleScope to prevent memory leak

MakeCallback can only be called from a valid v8::HandleScope.

Fixed #6487
pull/5010/head
Trevor Norris 2013-11-11 11:24:31 -08:00
parent f230a1cf74
commit 7f09a13bba
1 changed files with 1 additions and 0 deletions

View File

@ -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());