summaryrefslogtreecommitdiff
path: root/src/handle_wrap.cc
diff options
context:
space:
mode:
authorIgor Zinkovsky <igorzi@microsoft.com>2011-07-26 18:37:21 -0700
committerBen Noordhuis <info@bnoordhuis.nl>2011-07-27 03:59:33 +0200
commit187fe27a6e7da9d1f5ec9896af51a16c69d4c6c2 (patch)
tree2a72a34d8abdcc18607ce4d78b0ee70af4117721 /src/handle_wrap.cc
parentde261713bfdffece3a5675fcf325dbcca7542e87 (diff)
downloadandroid-node-v8-187fe27a6e7da9d1f5ec9896af51a16c69d4c6c2.tar.gz
android-node-v8-187fe27a6e7da9d1f5ec9896af51a16c69d4c6c2.tar.bz2
android-node-v8-187fe27a6e7da9d1f5ec9896af51a16c69d4c6c2.zip
stdio binding + javascript to enable process.stdin.listen()
Diffstat (limited to 'src/handle_wrap.cc')
-rw-r--r--src/handle_wrap.cc10
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());
}