diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2012-01-10 23:54:40 +0400 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2012-01-11 00:01:19 +0400 |
commit | 0ad2717fd88e5ddd28a1c245c78b37bfe9aa4197 (patch) | |
tree | 365c407a7cc8e1e138c6dcd73eb315265be846b4 /src | |
parent | 2d8af39accc6e1a863aa60ed80289508f3df50e8 (diff) |
Make sure that zlib contexts are not garbage collected when busy
Diffstat (limited to 'src')
-rw-r--r-- | src/node_zlib.cc | 2 |
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> |