Permalink
Browse files

vm: add error message if we abort

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 imyller committed Sep 17, 2016
1 parent ba763e7 commit fba531907e170c034a30a86e7027a23c8b4fae89
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/node_watchdog.cc
@@ -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);

0 comments on commit fba5319

Please sign in to comment.