Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2012-01-10 23:54:40 +0400
committerBert Belder <bertbelder@gmail.com>2012-01-11 00:01:19 +0400
commit0ad2717fd88e5ddd28a1c245c78b37bfe9aa4197 (patch)
tree365c407a7cc8e1e138c6dcd73eb315265be846b4 /src
parent2d8af39accc6e1a863aa60ed80289508f3df50e8 (diff)
Make sure that zlib contexts are not garbage collected when busy
Diffstat (limited to 'src')
-rw-r--r--src/node_zlib.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/node_zlib.cc b/src/node_zlib.cc
index 952fc26788b..b3b430f3d1b 100644
--- a/src/node_zlib.cc
+++ b/src/node_zlib.cc
@@ -134,6 +134,7 @@ template <node_zlib_mode mode> class ZCtx : public ObjectWrap {
ZCtx<mode>::After);
req_wrap->Dispatched();
+ ctx->Ref();
return req_wrap->object_;
}
@@ -191,6 +192,7 @@ template <node_zlib_mode mode> class ZCtx : public ObjectWrap {
// delete the ReqWrap
delete req_wrap;
+ ctx->Unref();
}
static Handle<Value>