Skip to content

Commit ba66145

Browse files
codebytereRafaelGSS
authored andcommitted
src: fix -Wunreachable-code in src/node_api.cc
PR-URL: #58901 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Vladimir Morozov <[email protected]>
1 parent 98f29fa commit ba66145

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node_api.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,8 +1058,7 @@ napi_create_external_buffer(napi_env env,
10581058

10591059
#ifdef V8_ENABLE_SANDBOX
10601060
return napi_set_last_error(env, napi_no_external_buffers_allowed);
1061-
#endif // V8_ENABLE_SANDBOX
1062-
1061+
#else
10631062
v8::Isolate* isolate = env->isolate;
10641063

10651064
// The finalizer object will delete itself after invoking the callback.
@@ -1081,6 +1080,7 @@ napi_create_external_buffer(napi_env env,
10811080
// as it will be deleted when the buffer to which it is associated
10821081
// is finalized.
10831082
// coverity[leaked_storage]
1083+
#endif // V8_ENABLE_SANDBOX
10841084
}
10851085

10861086
napi_status NAPI_CDECL napi_create_buffer_copy(napi_env env,

0 commit comments

Comments
 (0)