summaryrefslogtreecommitdiff
path: root/src/timer_wrap.cc
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2011-10-14 15:00:37 +0000
committerBen Noordhuis <info@bnoordhuis.nl>2011-10-14 15:01:26 +0000
commit87b34c94fa47cac4be62011e448f8e2cffc73ca6 (patch)
tree562a03af2e55bd5854b9cc2330b8aba5c97b0ef3 /src/timer_wrap.cc
parent9193062e70a23f3102dd3ed11ee8e39b14754e3d (diff)
downloadnode-87b34c94fa47cac4be62011e448f8e2cffc73ca6.tar.gz
timer_wrap: add sanity check assert
Diffstat (limited to 'src/timer_wrap.cc')
-rw-r--r--src/timer_wrap.cc3
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