Skip to content

Commit b51438e

Browse files
codebyteremarco-ippolito
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 6ed16a8 commit b51438e

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
@@ -1046,8 +1046,7 @@ napi_create_external_buffer(napi_env env,
10461046

10471047
#if defined(V8_ENABLE_SANDBOX)
10481048
return napi_set_last_error(env, napi_no_external_buffers_allowed);
1049-
#endif
1050-
1049+
#else
10511050
v8::Isolate* isolate = env->isolate;
10521051

10531052
// The finalizer object will delete itself after invoking the callback.
@@ -1069,6 +1068,7 @@ napi_create_external_buffer(napi_env env,
10691068
// as it will be deleted when the buffer to which it is associated
10701069
// is finalized.
10711070
// coverity[leaked_storage]
1071+
#endif // V8_ENABLE_SANDBOX
10721072
}
10731073

10741074
napi_status NAPI_CDECL napi_create_buffer_copy(napi_env env,

0 commit comments

Comments
 (0)