node: fix leaking Context handle

The call to node::Environment::GetCurrent(Isolate*) makes the call to
v8::Isolate::GetCurrentContext(). Doing so creates a new handle that
bubbled to the v8::SealHandleScope().

PR-URL: https://github.com/nodejs/node/pull/3945
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: James Snell <jasnell@gmail.com>
This commit is contained in:
Trevor Norris authored and Myles Borins committed 2016-02-11 11:29:14 -08:00
1 parent a79baf03cd
commit 3a48f0022f
1 file changed
+1
+1
View File
@@ -3177,6 +3177,7 @@ static void EnableDebug(Environment* env) {
// Called from the main thread.
static void DispatchDebugMessagesAsyncCallback(uv_async_t* handle) {
HandleScope scope(node_isolate);
if (debugger_running == false) {
fprintf(stderr, "Starting debugger agent.\n");