stream_base: various improvements
authorFedor Indutny <fedor@indutny.com>
Tue, 11 Aug 2015 19:27:22 +0000 (12:27 -0700)
committerFedor Indutny <fedor@indutny.com>
Thu, 20 Aug 2015 08:14:37 +0000 (01:14 -0700)
commit291b310e219023c4d93b216b1081ef47386f8750
treef9f28676798681673642bee1156185b15809e911
parent0d39d35739828afdc388140ccb30420aea3d3484
stream_base: various improvements

Expose and use in TLSWrap an `v8::External` wrap of the
`StreamBase*` pointer instead of guessing the ancestor C++ class in
`node_wrap.h`.

Make use of `StreamBase::Callback` structure for storing/passing both
callback and context in a single object.

Introduce `GetObject()` for future user-land usage, when a child class
is not going to be inherited from AsyncWrap.

PR-URL: https://github.com/nodejs/node/pull/2351
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
lib/_tls_wrap.js
src/env.h
src/node_wrap.h
src/stream_base-inl.h
src/stream_base.cc
src/stream_base.h
src/stream_wrap.cc
src/tls_wrap.cc