Created
January 21, 2012 22:36
-
-
Save igorzi/1654301 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From d1965414e00dc82b80e57a8d728b9acebf1a9221 Mon Sep 17 00:00:00 2001 | |
From: Igor Zinkovsky <igorzi@microsoft.com> | |
Date: Sat, 21 Jan 2012 14:35:25 -0800 | |
Subject: [PATCH] only ref non-default isolate loops | |
--- | |
src/node_isolate.cc | 9 ++++----- | |
1 files changed, 4 insertions(+), 5 deletions(-) | |
diff --git a/src/node_isolate.cc b/src/node_isolate.cc | |
index a0d2c45..ce98088 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; | |
} | |
-- | |
1.7.4.msysgit.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment