mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
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:
2 files changed
+1
-4
No files matched your search
@@ -56,10 +56,6 @@ const {
|
||||
|
||||
require('internal/ffi-shared-buffer');
|
||||
|
||||
DynamicLibrary.prototype[SymbolDispose] = function() {
|
||||
this.close();
|
||||
};
|
||||
|
||||
function checkFFIPermission() {
|
||||
if (!permission.isEnabled()) {
|
||||
return;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user