stat_watcher: root JS objects in HandleScope with Local<>

pull/24503/head
Ben Noordhuis 2012-03-26 07:02:00 -07:00
parent 1a49df5fa9
commit 3005965266
1 changed files with 3 additions and 3 deletions

View File

@ -51,9 +51,9 @@ void StatWatcher::Callback(EV_P_ ev_stat *watcher, int revents) {
StatWatcher *handler = static_cast<StatWatcher*>(watcher->data);
assert(watcher == &handler->watcher_);
HandleScope scope;
Handle<Value> argv[2];
argv[0] = Handle<Value>(BuildStatsObject(&watcher->attr));
argv[1] = Handle<Value>(BuildStatsObject(&watcher->prev));
Local<Value> argv[2];
argv[0] = BuildStatsObject(&watcher->attr);
argv[1] = BuildStatsObject(&watcher->prev);
MakeCallback(handler->handle_, "onchange", 2, argv);
}