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.

PR-URL: #8634
Fixes: #8555
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
fhinkel authored and jasnell committed Sep 29, 2016
1 parent ce65ac1 commit 01b3d5a
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 01b3d5a

Please sign in to comment.