5#include "flutter/fml/native_library.h"
12NativeLibrary::NativeLibrary(
const char*
path) {
14 handle_ = ::dlopen(
path, RTLD_NOW);
15 if (handle_ ==
nullptr) {
17 << ::dlerror() <<
"'.";
21NativeLibrary::NativeLibrary(Handle handle,
bool close_handle)
22 :
handle_(handle), close_handle_(close_handle) {}
24NativeLibrary::~NativeLibrary() {
33 FML_LOG(
ERROR) <<
"Could not close library due to error '" << ::dlerror()
39NativeLibrary::Handle NativeLibrary::GetHandle()
const {
45 return library->GetHandle() !=
nullptr ? library :
nullptr;
50 bool close_handle_when_done) {
53 return library->GetHandle() !=
nullptr ? library :
nullptr;
61 return ::dlsym(
handle_, symbol);
static sk_sp< Effect > Create()
#define FML_DLOG(severity)
#define FML_LOG(severity)
static FunctionPtr Resolve(Thread *thread, Zone *zone, const GrowableArray< const Instance * > &caller_arguments, const Class &receiver_class, const String &name, const Array &descriptor)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
RefPtr< T > AdoptRef(T *ptr)