From 9556ef32410bc23915bd597941e212246022331f Mon Sep 17 00:00:00 2001 From: Franziska Hinkelmann Date: Sat, 17 Sep 2016 18:48:27 +0200 Subject: [PATCH] vm: add error message if we abort Add an error message in watchdog if we abort because uv_loop_init fails. PR-URL: https://github.com/nodejs/node/pull/8634 Fixes: https://github.com/nodejs/node/issues/8555 Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Ilkka Myller Reviewed-By: Colin Ihrig --- src/node_watchdog.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/node_watchdog.cc b/src/node_watchdog.cc index 2811ab06ed3abf..98564fe923e88a 100644 --- a/src/node_watchdog.cc +++ b/src/node_watchdog.cc @@ -14,7 +14,10 @@ Watchdog::Watchdog(Environment* env, uint64_t ms) : env_(env), 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);