aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bun.js/bindings/napi.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bun.js/bindings/napi.cpp b/src/bun.js/bindings/napi.cpp
index 33ef5e286..97f3222c9 100644
--- a/src/bun.js/bindings/napi.cpp
+++ b/src/bun.js/bindings/napi.cpp
@@ -107,7 +107,7 @@ static NapiRefWeakHandleOwner& weakValueHandleOwner()
void NapiFinalizer::call(JSC::JSGlobalObject* globalObject, void* data)
{
if (this->finalize_cb) {
- this->finalize_cb(reinterpret_cast<napi_env>(globalObject), this->finalize_hint, data);
+ this->finalize_cb(reinterpret_cast<napi_env>(globalObject), data, this->finalize_hint);
}
}
@@ -149,7 +149,7 @@ void NapiRef::unref()
void NapiRef::clear()
{
- this->finalizer.call(this->globalObject.get(), nullptr);
+ this->finalizer.call(this->globalObject.get(), this->data);
this->globalObject.clear();
this->weakValueRef.clear();
this->strongRef.clear();