diff options
author | Igor Zinkovsky <igorzi@microsoft.com> | 2011-07-26 18:37:21 -0700 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2011-07-27 03:59:33 +0200 |
commit | 187fe27a6e7da9d1f5ec9896af51a16c69d4c6c2 (patch) | |
tree | 2a72a34d8abdcc18607ce4d78b0ee70af4117721 /src/handle_wrap.cc | |
parent | de261713bfdffece3a5675fcf325dbcca7542e87 (diff) | |
download | node-new-187fe27a6e7da9d1f5ec9896af51a16c69d4c6c2.tar.gz |
stdio binding + javascript to enable process.stdin.listen()
Diffstat (limited to 'src/handle_wrap.cc')
-rw-r--r-- | src/handle_wrap.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc index 140b8bad16..c1bdef9d54 100644 --- a/src/handle_wrap.cc +++ b/src/handle_wrap.cc @@ -50,7 +50,9 @@ Handle<Value> HandleWrap::Close(const Arguments& args) { HandleWrap::HandleWrap(Handle<Object> object, uv_handle_t* h) { handle__ = h; - h->data = this; + if (h) { + h->data = this; + } HandleScope scope; assert(object_.IsEmpty()); @@ -60,6 +62,12 @@ HandleWrap::HandleWrap(Handle<Object> object, uv_handle_t* h) { } +void HandleWrap::SetHandle(uv_handle_t* h) { + handle__ = h; + h->data = this; +} + + HandleWrap::~HandleWrap() { assert(object_.IsEmpty()); } |