Skip to content

Commit 01b3d5a

Browse files
fhinkeljasnell
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 <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ilkka Myller <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent ce65ac1 commit 01b3d5a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/node_watchdog.cc

Lines changed: 4 additions & 1 deletion
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)