summaryrefslogtreecommitdiff
path: root/src/node_file.cc
diff options
context:
space:
mode:
authorTrevor Norris <trev.norris@gmail.com>2013-09-24 14:12:11 -0700
committerTrevor Norris <trev.norris@gmail.com>2013-10-31 14:17:51 -0700
commitefa62fd9cc817434206d9fd8592b7bbeaa240e9c (patch)
treed3385ab0c74b20fab8d4e53cfa8408dafec69492 /src/node_file.cc
parent21fbbd579080bab569c66100471a4c7b462bb0d6 (diff)
downloadnode-new-efa62fd9cc817434206d9fd8592b7bbeaa240e9c.tar.gz
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/node_file.cc')
-rw-r--r--src/node_file.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node_file.cc b/src/node_file.cc
index cb37124c1a..5650e4cc2d 100644
--- a/src/node_file.cc
+++ b/src/node_file.cc
@@ -67,7 +67,7 @@ using v8::Value;
class FSReqWrap: public ReqWrap<uv_fs_t> {
public:
FSReqWrap(Environment* env, const char* syscall, char* data = NULL)
- : ReqWrap<uv_fs_t>(env),
+ : ReqWrap<uv_fs_t>(env, Object::New()),
syscall_(syscall),
data_(data) {
}
@@ -214,7 +214,7 @@ static void After(uv_fs_t *req) {
}
}
- MakeCallback(env, req_wrap->object(), env->oncomplete_string(), argc, argv);
+ req_wrap->MakeCallback(env->oncomplete_string(), argc, argv);
uv_fs_req_cleanup(&req_wrap->req_);
delete req_wrap;