ffi: move DynamicLibrary disposer to native layer

Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
PR-URL: https://github.com/nodejs/node/pull/63459
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
This commit is contained in:
René authored and GitHub committed 2026-05-22 17:01:28 +00:00
1 parent 5ff701aa28
commit ca3766568e
2 files changed
+1 -4

No files matched your search

-4
View File
@@ -56,10 +56,6 @@ const {
require('internal/ffi-shared-buffer');
DynamicLibrary.prototype[SymbolDispose] = function() {
this.close();
};
function checkFFIPermission() {
if (!permission.isEnabled()) {
return;
+1
View File
@@ -1102,6 +1102,7 @@ Local<FunctionTemplate> DynamicLibrary::GetConstructorTemplate(
static_cast<PropertyAttribute>(ReadOnly));
SetProtoMethod(isolate, tmpl, "close", DynamicLibrary::Close);
SetProtoDispose(isolate, tmpl, DynamicLibrary::Close);
SetProtoMethod(isolate, tmpl, "getFunction", DynamicLibrary::GetFunction);
SetProtoMethod(isolate, tmpl, "getFunctions", DynamicLibrary::GetFunctions);
SetProtoMethod(isolate, tmpl, "getSymbol", DynamicLibrary::GetSymbol);