Browse Source

src: use global SealHandleScope

Helps to find Handle leaks in Debug mode.

PR-URL: https://github.com/iojs/io.js/pull/1395
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
v1.8.0-commit
Fedor Indutny 10 years ago
parent
commit
a07c69113a
  1. 4
      src/node.cc

4
src/node.cc

@ -101,6 +101,7 @@ using v8::ObjectTemplate;
using v8::Promise; using v8::Promise;
using v8::PromiseRejectMessage; using v8::PromiseRejectMessage;
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;
@ -3836,6 +3837,8 @@ static void StartNodeInstance(void* arg) {
if (instance_data->use_debug_agent()) if (instance_data->use_debug_agent())
EnableDebug(env); EnableDebug(env);
{
SealHandleScope seal(isolate);
bool more; bool more;
do { do {
v8::platform::PumpMessageLoop(default_platform, isolate); v8::platform::PumpMessageLoop(default_platform, isolate);
@ -3852,6 +3855,7 @@ static void StartNodeInstance(void* arg) {
more = true; more = true;
} }
} while (more == true); } while (more == true);
}
int exit_code = EmitExit(env); int exit_code = EmitExit(env);
if (instance_data->is_main()) if (instance_data->is_main())

Loading…
Cancel
Save