(path, definitions)
| 166 | } |
| 167 | |
| 168 | function dlopen(path, definitions) { |
| 169 | checkFFIPermission(); |
| 170 | |
| 171 | const lib = new DynamicLibrary(path); |
| 172 | try { |
| 173 | const functions = definitions === undefined ? ObjectFreeze({ __proto__: null }) : lib.getFunctions(definitions); |
| 174 | return { |
| 175 | lib, |
| 176 | functions, |
| 177 | [SymbolDispose]() { lib.close(); }, |
| 178 | }; |
| 179 | } catch (error) { |
| 180 | lib.close(); |
| 181 | throw error; |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | function dlclose(handle) { |
| 186 | checkFFIPermission(); |
nothing calls this directly
no test coverage detected
searching dependent graphs…