From: Ben Noordhuis Date: Fri, 14 Oct 2011 15:00:37 +0000 (+0000) Subject: timer_wrap: add sanity check assert X-Git-Tag: v0.5.10~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=87b34c94fa47cac4be62011e448f8e2cffc73ca6;p=platform%2Fupstream%2Fnodejs.git timer_wrap: add sanity check assert --- diff --git a/src/timer_wrap.cc b/src/timer_wrap.cc index cfae78d..99db0c5 100644 --- a/src/timer_wrap.cc +++ b/src/timer_wrap.cc @@ -67,7 +67,10 @@ class TimerWrap : public HandleWrap { TimerWrap(Handle 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