diff options
author | Trevor Norris <trev.norris@gmail.com> | 2013-09-24 14:12:11 -0700 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2013-10-31 14:17:51 -0700 |
commit | efa62fd9cc817434206d9fd8592b7bbeaa240e9c (patch) | |
tree | d3385ab0c74b20fab8d4e53cfa8408dafec69492 /src/tcp_wrap.cc | |
parent | 21fbbd579080bab569c66100471a4c7b462bb0d6 (diff) | |
download | android-node-v8-efa62fd9cc817434206d9fd8592b7bbeaa240e9c.tar.gz android-node-v8-efa62fd9cc817434206d9fd8592b7bbeaa240e9c.tar.bz2 android-node-v8-efa62fd9cc817434206d9fd8592b7bbeaa240e9c.zip |
node: add AsyncListener support
AsyncListener is a JS API that works in tandem with the AsyncWrap class
to allow the user to be alerted to key events in the life cycle of an
asynchronous event. The AsyncWrap class has its own MakeCallback
implementation that core will be migrated to use, and uses state sharing
techniques to allow quicker communication between JS and C++ whether the
async event callbacks need to be called.
Diffstat (limited to 'src/tcp_wrap.cc')
-rw-r--r-- | src/tcp_wrap.cc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index 840dd92077..73058dbd4f 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -321,11 +321,7 @@ void TCPWrap::OnConnection(uv_stream_t* handle, int status) { argv[1] = client_obj; } - MakeCallback(env, - tcp_wrap->object(), - env->onconnection_string(), - ARRAY_SIZE(argv), - argv); + tcp_wrap->MakeCallback(env->onconnection_string(), ARRAY_SIZE(argv), argv); } @@ -350,11 +346,8 @@ void TCPWrap::AfterConnect(uv_connect_t* req, int status) { v8::True(node_isolate), v8::True(node_isolate) }; - MakeCallback(env, - req_wrap_obj, - env->oncomplete_string(), - ARRAY_SIZE(argv), - argv); + + req_wrap->MakeCallback(env->oncomplete_string(), ARRAY_SIZE(argv), argv); delete req_wrap; } |