mirror of https://github.com/nodejs/node.git
node: add HandleScope to prevent memory leak
MakeCallback can only be called from a valid v8::HandleScope. Fixed #6487pull/5010/head
parent
f230a1cf74
commit
7f09a13bba
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue