Created
December 17, 2013 18:27
-
-
Save tjfontaine/8010125 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/node_watchdog.cc b/src/node_watchdog.cc | |
| index 34da4b0..bf4b596 100644 | |
| --- a/src/node_watchdog.cc | |
| +++ b/src/node_watchdog.cc | |
| @@ -20,7 +20,7 @@ | |
| // USE OR OTHER DEALINGS IN THE SOFTWARE. | |
| #include "node_watchdog.h" | |
| -#include <assert.h> | |
| +#include "util.h" | |
| namespace node { | |
| @@ -29,24 +29,24 @@ using v8::V8; | |
| Watchdog::Watchdog(uint64_t ms) : destroyed_(false) { | |
| loop_ = uv_loop_new(); | |
| - if (!loop_) | |
| - abort(); | |
| + | |
| + CHECK(loop_ != NULL); | |
| int rc = uv_async_init(loop_, &async_, &Watchdog::Async); | |
| - if (rc) | |
| - abort(); | |
| + | |
| + CHECK(rc == 0); | |
| rc = uv_timer_init(loop_, &timer_); | |
| - if (rc) | |
| - abort(); | |
| + | |
| + CHECK(rc == 0); | |
| rc = uv_timer_start(&timer_, &Watchdog::Timer, ms, 0); | |
| - if (rc) | |
| - abort(); | |
| + | |
| + CHECK(rc == 0); | |
| rc = uv_thread_create(&thread_, &Watchdog::Run, this); | |
| - if (rc) | |
| - abort(); | |
| + | |
| + CHECK(rc == 0); | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment