summaryrefslogtreecommitdiff
path: root/src/pipe_wrap.cc
diff options
context:
space:
mode:
authorTrevor Norris <trev.norris@gmail.com>2014-01-20 13:33:16 -0800
committerTrevor Norris <trev.norris@gmail.com>2014-02-05 13:30:56 -0800
commit4a9af3fecb4baf677f265e2e6e34a674a53810a6 (patch)
tree3e96cf57bc7f9d47ebe7a177acc7a2d18dc13bdd /src/pipe_wrap.cc
parentc9abb59638bc4bc64176ded80ebdc05d066ad0db (diff)
downloadnode-new-4a9af3fecb4baf677f265e2e6e34a674a53810a6.tar.gz
async_wrap: add provider types/pass to constructor
These will be used to allow users to filter for which types of calls they wish their callbacks to run. Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
Diffstat (limited to 'src/pipe_wrap.cc')
-rw-r--r--src/pipe_wrap.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc
index 517d97ccb8..67a756294e 100644
--- a/src/pipe_wrap.cc
+++ b/src/pipe_wrap.cc
@@ -128,7 +128,10 @@ void PipeWrap::New(const FunctionCallbackInfo<Value>& args) {
PipeWrap::PipeWrap(Environment* env, Handle<Object> object, bool ipc)
- : StreamWrap(env, object, reinterpret_cast<uv_stream_t*>(&handle_)) {
+ : StreamWrap(env,
+ object,
+ reinterpret_cast<uv_stream_t*>(&handle_),
+ AsyncWrap::PROVIDER_PIPEWRAP) {
int r = uv_pipe_init(env->event_loop(), &handle_, ipc);
assert(r == 0); // How do we proxy this error up to javascript?
// Suggestion: uv_pipe_init() returns void.
@@ -275,7 +278,9 @@ void PipeWrap::Connect(const FunctionCallbackInfo<Value>& args) {
Local<Object> req_wrap_obj = args[0].As<Object>();
String::AsciiValue name(args[1]);
- ConnectWrap* req_wrap = new ConnectWrap(env, req_wrap_obj);
+ ConnectWrap* req_wrap = new ConnectWrap(env,
+ req_wrap_obj,
+ AsyncWrap::PROVIDER_CONNECTWRAP);
uv_pipe_connect(&req_wrap->req_,
&wrap->handle_,
*name,