@@ -54,7 +54,7 @@ typedef class ReqWrap<uv_fs_t> FSReqWrap;
54
54
static Persistent<String> encoding_symbol;
55
55
static Persistent<String> errno_symbol;
56
56
static Persistent<String> buf_symbol;
57
- static Persistent<String> callback_sym ;
57
+ static Persistent<String> oncomplete_sym ;
58
58
59
59
static inline bool SetCloseOnExec (int fd) {
60
60
#ifdef __POSIX__
@@ -77,7 +77,7 @@ static void After(uv_fs_t *req) {
77
77
78
78
FSReqWrap* req_wrap = (FSReqWrap*) req->data ;
79
79
assert (&req_wrap->req_ == req);
80
- Local<Value> callback_v = req_wrap->object_ ->Get (callback_sym );
80
+ Local<Value> callback_v = req_wrap->object_ ->Get (oncomplete_sym );
81
81
assert (callback_v->IsFunction ());
82
82
Local<Function> callback = Local<Function>::Cast (callback_v);
83
83
@@ -192,7 +192,7 @@ static void After(uv_fs_t *req) {
192
192
193
193
TryCatch try_catch;
194
194
195
- callback->Call (v8::Context::GetCurrent ()-> Global () , argc, argv);
195
+ callback->Call (req_wrap-> object_ , argc, argv);
196
196
197
197
if (try_catch.HasCaught ()) {
198
198
FatalException (try_catch);
@@ -218,7 +218,7 @@ struct fs_req_wrap {
218
218
int r = uv_fs_##func(uv_default_loop(), &req_wrap->req_, \
219
219
__VA_ARGS__, After); \
220
220
assert (r == 0 ); \
221
- req_wrap->object_->Set (callback_sym , callback); \
221
+ req_wrap->object_->Set (oncomplete_sym , callback); \
222
222
req_wrap->Dispatched (); \
223
223
return scope.Close(req_wrap->object_);
224
224
@@ -991,7 +991,7 @@ void InitFs(Handle<Object> target) {
991
991
stats_constructor_template->GetFunction ());
992
992
File::Initialize (target);
993
993
994
- callback_sym = NODE_PSYMBOL (" callback " );
994
+ oncomplete_sym = NODE_PSYMBOL (" oncomplete " );
995
995
996
996
#ifdef __POSIX__
997
997
StatWatcher::Initialize (target);
0 commit comments