mirror of https://github.com/nodejs/node.git
stat_watcher: root JS objects in HandleScope with Local<>
parent
1a49df5fa9
commit
3005965266
|
@ -51,9 +51,9 @@ void StatWatcher::Callback(EV_P_ ev_stat *watcher, int revents) {
|
||||||
StatWatcher *handler = static_cast<StatWatcher*>(watcher->data);
|
StatWatcher *handler = static_cast<StatWatcher*>(watcher->data);
|
||||||
assert(watcher == &handler->watcher_);
|
assert(watcher == &handler->watcher_);
|
||||||
HandleScope scope;
|
HandleScope scope;
|
||||||
Handle<Value> argv[2];
|
Local<Value> argv[2];
|
||||||
argv[0] = Handle<Value>(BuildStatsObject(&watcher->attr));
|
argv[0] = BuildStatsObject(&watcher->attr);
|
||||||
argv[1] = Handle<Value>(BuildStatsObject(&watcher->prev));
|
argv[1] = BuildStatsObject(&watcher->prev);
|
||||||
MakeCallback(handler->handle_, "onchange", 2, argv);
|
MakeCallback(handler->handle_, "onchange", 2, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue