Skip to content

Commit

Permalink
Check napi callee status
Browse files Browse the repository at this point in the history
  • Loading branch information
richerfu committed Dec 1, 2024
1 parent e9880a1 commit c488e39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/napi-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2844,7 +2844,8 @@ inline void ArrayBuffer::Detach() {
inline size_t Buffer<T>::Length() const {
void *data = nullptr;
size_t length = 0;
napi_get_buffer_info(_env, _value, &data, &length);
napi_status status = napi_get_buffer_info(_env, _value, &data, &length);
NAPI_THROW_IF_FAILED(_env, status, Buffer<T>());
return length;
}

Expand Down

0 comments on commit c488e39

Please sign in to comment.