diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2011-10-14 15:00:37 +0000 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2011-10-14 15:01:26 +0000 |
commit | 87b34c94fa47cac4be62011e448f8e2cffc73ca6 (patch) | |
tree | 562a03af2e55bd5854b9cc2330b8aba5c97b0ef3 /src/timer_wrap.cc | |
parent | 9193062e70a23f3102dd3ed11ee8e39b14754e3d (diff) | |
download | node-87b34c94fa47cac4be62011e448f8e2cffc73ca6.tar.gz |
timer_wrap: add sanity check assert
Diffstat (limited to 'src/timer_wrap.cc')
-rw-r--r-- | src/timer_wrap.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/timer_wrap.cc b/src/timer_wrap.cc index cfae78d2a..99db0c5d6 100644 --- a/src/timer_wrap.cc +++ b/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 |