diff --git a/src/node_isolate.cc b/src/node_isolate.cc index a0d2c4507e5..ce980881a6c 100644 --- a/src/node_isolate.cc +++ b/src/node_isolate.cc @@ -269,6 +269,10 @@ Isolate::Isolate() { loop_ = uv_default_loop(); } else { loop_ = uv_loop_new(); + // Artificially ref the isolate loop so that the child + // isolate stays alive by default. process.exit will + // unref the loop (see Isolate::Unref). + uv_ref(loop_); } debug_state = kNone; @@ -280,11 +284,6 @@ Isolate::Isolate() { assert(v8_isolate_->GetData() == NULL); v8_isolate_->SetData(this); - // Artificially ref the isolate loop so that the child - // isolate stays alive by default. process.exit will - // unref the loop (see Isolate::Unref). - uv_ref(loop_); - globals_init_ = false; }