koffi 2.15.5 → 2.15.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/build/koffi/darwin_arm64/koffi.node +0 -0
- package/build/koffi/darwin_x64/koffi.node +0 -0
- package/build/koffi/freebsd_arm64/koffi.node +0 -0
- package/build/koffi/freebsd_ia32/koffi.node +0 -0
- package/build/koffi/freebsd_x64/koffi.node +0 -0
- package/build/koffi/linux_arm64/koffi.node +0 -0
- package/build/koffi/linux_armhf/koffi.node +0 -0
- package/build/koffi/linux_ia32/koffi.node +0 -0
- package/build/koffi/linux_loong64/koffi.node +0 -0
- package/build/koffi/linux_riscv64d/koffi.node +0 -0
- package/build/koffi/linux_x64/koffi.node +0 -0
- package/build/koffi/musl_arm64/koffi.node +0 -0
- package/build/koffi/musl_x64/koffi.node +0 -0
- package/build/koffi/openbsd_ia32/koffi.node +0 -0
- package/build/koffi/openbsd_x64/koffi.node +0 -0
- package/build/koffi/win32_arm64/koffi.node +0 -0
- package/build/koffi/win32_ia32/koffi.node +0 -0
- package/build/koffi/win32_x64/koffi.node +0 -0
- package/index.js +1 -1
- package/indirect.js +1 -1
- package/package.json +1 -1
- package/src/koffi/src/ffi.cc +11 -5
package/CHANGELOG.md
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/index.js
CHANGED
|
@@ -398,7 +398,7 @@ var require_package = __commonJS({
|
|
|
398
398
|
"../../../bin/Koffi/package/src/koffi/package.json"(exports2, module2) {
|
|
399
399
|
module2.exports = {
|
|
400
400
|
name: "koffi",
|
|
401
|
-
version: "2.15.
|
|
401
|
+
version: "2.15.6",
|
|
402
402
|
description: "Fast and simple C FFI (foreign function interface) for Node.js",
|
|
403
403
|
keywords: [
|
|
404
404
|
"foreign",
|
package/indirect.js
CHANGED
|
@@ -398,7 +398,7 @@ var require_package = __commonJS({
|
|
|
398
398
|
"../../../bin/Koffi/package/src/koffi/package.json"(exports2, module2) {
|
|
399
399
|
module2.exports = {
|
|
400
400
|
name: "koffi",
|
|
401
|
-
version: "2.15.
|
|
401
|
+
version: "2.15.6",
|
|
402
402
|
description: "Fast and simple C FFI (foreign function interface) for Node.js",
|
|
403
403
|
keywords: [
|
|
404
404
|
"foreign",
|
package/package.json
CHANGED
package/src/koffi/src/ffi.cc
CHANGED
|
@@ -2364,11 +2364,6 @@ bool InitAsyncBroker(Napi::Env env, InstanceData *instance)
|
|
|
2364
2364
|
return false;
|
|
2365
2365
|
}
|
|
2366
2366
|
napi_unref_threadsafe_function(env, instance->broker);
|
|
2367
|
-
|
|
2368
|
-
napi_add_env_cleanup_hook(env, [](void *udata) {
|
|
2369
|
-
napi_threadsafe_function broker = (napi_threadsafe_function)udata;
|
|
2370
|
-
napi_release_threadsafe_function(broker, napi_tsfn_abort);
|
|
2371
|
-
}, instance->broker);
|
|
2372
2367
|
}
|
|
2373
2368
|
|
|
2374
2369
|
return true;
|
|
@@ -2630,6 +2625,17 @@ static Napi::Object InitModule(Napi::Env env, Napi::Object exports)
|
|
|
2630
2625
|
|
|
2631
2626
|
exports.Set("version", Napi::String::New(env, K_STRINGIFY(VERSION)));
|
|
2632
2627
|
|
|
2628
|
+
napi_add_env_cleanup_hook(env, [](void *udata) {
|
|
2629
|
+
InstanceData *instance = (InstanceData *)udata;
|
|
2630
|
+
|
|
2631
|
+
if (instance->broker) {
|
|
2632
|
+
// This deadlocks if we try to do this when the module is destroyed, when
|
|
2633
|
+
// the InstanceData destructor runs, so run in the env cleanup hook instead,
|
|
2634
|
+
// where it seems to go okay.
|
|
2635
|
+
napi_release_threadsafe_function(instance->broker, napi_tsfn_abort);
|
|
2636
|
+
}
|
|
2637
|
+
}, instance);
|
|
2638
|
+
|
|
2633
2639
|
return exports;
|
|
2634
2640
|
}
|
|
2635
2641
|
|