Skip to content

Commit 6d00c08

Browse files
author
Igor Zinkovsky
committed
only ref non-default isolate loops
1 parent e10ed09 commit 6d00c08

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/node_isolate.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,10 @@ Isolate::Isolate() {
269269
loop_ = uv_default_loop();
270270
} else {
271271
loop_ = uv_loop_new();
272+
// Artificially ref the isolate loop so that the child
273+
// isolate stays alive by default. process.exit will
274+
// unref the loop (see Isolate::Unref).
275+
uv_ref(loop_);
272276
}
273277

274278
debug_state = kNone;
@@ -280,11 +284,6 @@ Isolate::Isolate() {
280284
assert(v8_isolate_->GetData() == NULL);
281285
v8_isolate_->SetData(this);
282286

283-
// Artificially ref the isolate loop so that the child
284-
// isolate stays alive by default. process.exit will
285-
// unref the loop (see Isolate::Unref).
286-
uv_ref(loop_);
287-
288287
globals_init_ = false;
289288
}
290289

0 commit comments

Comments
 (0)