Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 26a596b

Browse filesBrowse files
bnoordhuisaddaleax
authored andcommitted
src: fix abort on uv_loop_init() failure
Fixes: #34855 PR-URL: #34874 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent d953fa3 commit 26a596b
Copy full SHA for 26a596b

File tree

Expand file treeCollapse file tree

1 file changed

+9
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-1
lines changed
Open diff view settings
Collapse file

‎src/spawn_sync.cc‎

Copy file name to clipboardExpand all lines: src/spawn_sync.cc
+9-1Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,9 +457,17 @@ Maybe<bool> SyncProcessRunner::TryInitializeAndRunLoop(Local<Value> options) {
457457
SetError(UV_ENOMEM);
458458
return Just(false);
459459
}
460-
CHECK_EQ(uv_loop_init(uv_loop_), 0);
460+
461+
r = uv_loop_init(uv_loop_);
462+
if (r < 0) {
463+
delete uv_loop_;
464+
uv_loop_ = nullptr;
465+
SetError(r);
466+
return Just(false);
467+
}
461468

462469
if (!ParseOptions(options).To(&r)) return Nothing<bool>();
470+
463471
if (r < 0) {
464472
SetError(r);
465473
return Just(false);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.