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 <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>
This commit is contained in:
Franziska Hinkelmann
2016-09-17 18:48:27 +02:00
committed by Ilkka Myller
parent ba763e7bff
commit fba531907e

View File

@@ -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);