Ensure HandleScope is created before creating any new handles (which
`Context::Scope` and `Environment::GetCurrent` does).
PR-URL: https://github.com/iojs/io.js/pull/1133
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Brian White <mscdex@mscdex.net>
if (debugger_running == false) {
fprintf(stderr, "Starting debugger agent.\n");
+ HandleScope scope(node_isolate);
Environment* env = Environment::GetCurrent(node_isolate);
Context::Scope context_scope(env->context());
void EmitBeforeExit(Environment* env) {
- Context::Scope context_scope(env->context());
HandleScope handle_scope(env->isolate());
+ Context::Scope context_scope(env->context());
Local<Object> process_object = env->process_object();
Local<String> exit_code = FIXED_ONE_BYTE_STRING(env->isolate(), "exitCode");
Local<Value> args[] = {