Browse Source

src: use global SealHandleScope

Helps to find Handle leaks in Debug mode.

Ref: a5244d3 "deps: backport 1f8555 from v8's upstream"

PR-URL: https://github.com/nodejs/node/pull/3945
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: James Snell <jasnell@gmail.com>
v0.12-staging
Trevor Norris 10 years ago
committed by Myles Borins
parent
commit
a79baf03cd
  1. 5
      src/node.cc

5
src/node.cc

@ -116,6 +116,7 @@ using v8::Number;
using v8::Object; using v8::Object;
using v8::ObjectTemplate; using v8::ObjectTemplate;
using v8::PropertyCallbackInfo; using v8::PropertyCallbackInfo;
using v8::SealHandleScope;
using v8::String; using v8::String;
using v8::TryCatch; using v8::TryCatch;
using v8::Uint32; using v8::Uint32;
@ -3769,6 +3770,8 @@ int Start(int argc, char** argv) {
if (use_debug_agent) if (use_debug_agent)
EnableDebug(env); EnableDebug(env);
{
SealHandleScope seal(node_isolate);
bool more; bool more;
do { do {
more = uv_run(env->event_loop(), UV_RUN_ONCE); more = uv_run(env->event_loop(), UV_RUN_ONCE);
@ -3782,6 +3785,8 @@ int Start(int argc, char** argv) {
more = true; more = true;
} }
} while (more == true); } while (more == true);
}
code = EmitExit(env); code = EmitExit(env);
RunAtExit(env); RunAtExit(env);

Loading…
Cancel
Save