Permalink
Browse files

only ref non-default isolate loops

  • Loading branch information...
1 parent e10ed09 commit 6d00c089e36955a8c172b5615329280d10dec9da Igor Zinkovsky committed Jan 21, 2012
Showing with 4 additions and 5 deletions.
  1. +4 −5 src/node_isolate.cc
View
@@ -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;
}

0 comments on commit 6d00c08

Please sign in to comment.