Skip to content

Commit c1a3a98

Browse files
committed
wasi: address coverity warning
- add check for case when trying to provide a better Exception fails - the code was modified to avoid a CHECK_EQ in all cases in #31076, however, I believe that if we fail to create the exeption to throw instead of simply returning using a CHECK makes more sense. I think it should also address the coverity warning about not initializing in the constructor. Signed-off-by: Michael Dawson <[email protected]> PR-URL: #49866 Reviewed-By: Colin Ihrig <[email protected]>
1 parent d398529 commit c1a3a98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node_wasi.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ WASI::WASI(Environment* env,
8383
int err = uvwasi_init(&uvw_, options);
8484
if (err != UVWASI_ESUCCESS) {
8585
Local<Value> exception;
86-
if (!WASIException(env->context(), err, "uvwasi_init").ToLocal(&exception))
87-
return;
86+
CHECK(
87+
WASIException(env->context(), err, "uvwasi_init").ToLocal(&exception));
8888

8989
env->isolate()->ThrowException(exception);
9090
}

0 commit comments

Comments
 (0)