diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-05-26 20:04:17 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-05-30 00:12:49 +0200 |
commit | 448adaa4563fb035c5fccfe4a9a0cc74b5ca5ba0 (patch) | |
tree | 16c59ba2097f4862ff677e3da10588d830788e3f /src/handle_wrap.cc | |
parent | 4d68daea0f3b092743a7793748f684c2827d6210 (diff) | |
download | android-node-v8-448adaa4563fb035c5fccfe4a9a0cc74b5ca5ba0.tar.gz android-node-v8-448adaa4563fb035c5fccfe4a9a0cc74b5ca5ba0.tar.bz2 android-node-v8-448adaa4563fb035c5fccfe4a9a0cc74b5ca5ba0.zip |
src: simplify HandleWrap initialization
Diffstat (limited to 'src/handle_wrap.cc')
-rw-r--r-- | src/handle_wrap.cc | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc index 07f19ad222..390f686425 100644 --- a/src/handle_wrap.cc +++ b/src/handle_wrap.cc @@ -108,9 +108,7 @@ Handle<Value> HandleWrap::Close(const Arguments& args) { HandleWrap::HandleWrap(Handle<Object> object, uv_handle_t* h) { flags_ = 0; handle__ = h; - if (h) { - h->data = this; - } + handle__->data = this; HandleScope scope(node_isolate); assert(object_.IsEmpty()); @@ -121,12 +119,6 @@ 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()); ngx_queue_remove(&handle_wrap_queue_); |