Skip to content

Commit fba5319

Browse files
fhinkelimyller
authored andcommitted
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>
1 parent ba763e7 commit fba5319

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/node_watchdog.cc

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ Watchdog::Watchdog(v8::Isolate* isolate, uint64_t ms) : isolate_(isolate),
1313
loop_ = new uv_loop_t;
1414
CHECK(loop_);
1515
rc = uv_loop_init(loop_);
16-
CHECK_EQ(0, rc);
16+
if (rc != 0) {
17+
FatalError("node::Watchdog::Watchdog()",
18+
"Failed to initialize uv loop.");
19+
}
1720

1821
rc = uv_async_init(loop_, &async_, &Watchdog::Async);
1922
CHECK_EQ(0, rc);

0 commit comments

Comments
 (0)