This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

stat_watcher: root JS objects in HandleScope with Local<>

  • Loading branch information...
bnoordhuis committed Mar 26, 2012
1 parent 1a49df5 commit 300596526647adc9da8db2615b3e70258de9e1bd
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/node_stat_watcher.cc
View
@@ -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);
}

0 comments on commit 3005965

Please sign in to comment.