Browse Source

timer_wrap: add sanity check assert

v0.7.4-release
Ben Noordhuis 13 years ago
parent
commit
87b34c94fa
  1. 3
      src/timer_wrap.cc

3
src/timer_wrap.cc

@ -67,7 +67,10 @@ class TimerWrap : public HandleWrap {
TimerWrap(Handle<Object> object)
: HandleWrap(object, (uv_handle_t*) &handle_) {
active_ = false;
int r = uv_timer_init(uv_default_loop(), &handle_);
assert(r == 0);
handle_.data = this;
// uv_timer_init adds a loop reference. (That is, it calls uv_ref.) This

Loading…
Cancel
Save