Skip to content

Commit

Permalink
vm: add error message if we abort
Browse files Browse the repository at this point in the history
Add an error message in watchdog if we abort because uv_loop_init fails.

Fixes nodejs#8555
  • Loading branch information
fhinkel committed Sep 20, 2016
1 parent 2a2ec9d commit a1e3f7b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/node_watchdog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ Watchdog::Watchdog(v8::Isolate* isolate, uint64_t ms) : isolate_(isolate),
loop_ = new uv_loop_t;
CHECK(loop_);
rc = uv_loop_init(loop_);
CHECK_EQ(0, rc);
if (rc != 0) {
FatalError("node::Watchdog::Watchdog()",
"Failed to initialize uv loop.");
}

rc = uv_async_init(loop_, &async_, &Watchdog::Async);
CHECK_EQ(0, rc);
Expand Down

0 comments on commit a1e3f7b

Please sign in to comment.