Skip to content

Commit 37a9b8e

Browse files
legendecasmhdawson
authored andcommitted
src: set default return value of Reference Ref/Unref to 0
PR-URL: #1004 Reviewed-By: Michael Dawson <midawson@redhat.com>
1 parent ad76ad0 commit 37a9b8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

napi-inl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2609,15 +2609,15 @@ template <typename T>
26092609
inline uint32_t Reference<T>::Ref() {
26102610
uint32_t result;
26112611
napi_status status = napi_reference_ref(_env, _ref, &result);
2612-
NAPI_THROW_IF_FAILED(_env, status, 1);
2612+
NAPI_THROW_IF_FAILED(_env, status, 0);
26132613
return result;
26142614
}
26152615

26162616
template <typename T>
26172617
inline uint32_t Reference<T>::Unref() {
26182618
uint32_t result;
26192619
napi_status status = napi_reference_unref(_env, _ref, &result);
2620-
NAPI_THROW_IF_FAILED(_env, status, 1);
2620+
NAPI_THROW_IF_FAILED(_env, status, 0);
26212621
return result;
26222622
}
26232623

0 commit comments

Comments
 (0)