Loading libnativeloader/include/nativeloader/native_loader.h +3 −0 Original line number Original line Diff line number Diff line Loading @@ -43,6 +43,9 @@ void* OpenNativeLibrary(JNIEnv* env, jobject class_loader, jobject class_loader, jstring library_path); jstring library_path); __attribute__((visibility("default"))) bool CloseNativeLibrary(void* handle); #if defined(__ANDROID__) #if defined(__ANDROID__) // Look up linker namespace by class_loader. Returns nullptr if // Look up linker namespace by class_loader. Returns nullptr if // there is no namespace associated with the class_loader. // there is no namespace associated with the class_loader. Loading libnativeloader/native_loader.cpp +4 −0 Original line number Original line Diff line number Diff line Loading @@ -241,6 +241,10 @@ void* OpenNativeLibrary(JNIEnv* env, #endif #endif } } bool CloseNativeLibrary(void* handle) { return dlclose(handle) == 0; } #if defined(__ANDROID__) #if defined(__ANDROID__) android_namespace_t* FindNamespaceByClassLoader(JNIEnv* env, jobject class_loader) { android_namespace_t* FindNamespaceByClassLoader(JNIEnv* env, jobject class_loader) { std::lock_guard<std::mutex> guard(g_namespaces_mutex); std::lock_guard<std::mutex> guard(g_namespaces_mutex); Loading Loading
libnativeloader/include/nativeloader/native_loader.h +3 −0 Original line number Original line Diff line number Diff line Loading @@ -43,6 +43,9 @@ void* OpenNativeLibrary(JNIEnv* env, jobject class_loader, jobject class_loader, jstring library_path); jstring library_path); __attribute__((visibility("default"))) bool CloseNativeLibrary(void* handle); #if defined(__ANDROID__) #if defined(__ANDROID__) // Look up linker namespace by class_loader. Returns nullptr if // Look up linker namespace by class_loader. Returns nullptr if // there is no namespace associated with the class_loader. // there is no namespace associated with the class_loader. Loading
libnativeloader/native_loader.cpp +4 −0 Original line number Original line Diff line number Diff line Loading @@ -241,6 +241,10 @@ void* OpenNativeLibrary(JNIEnv* env, #endif #endif } } bool CloseNativeLibrary(void* handle) { return dlclose(handle) == 0; } #if defined(__ANDROID__) #if defined(__ANDROID__) android_namespace_t* FindNamespaceByClassLoader(JNIEnv* env, jobject class_loader) { android_namespace_t* FindNamespaceByClassLoader(JNIEnv* env, jobject class_loader) { std::lock_guard<std::mutex> guard(g_namespaces_mutex); std::lock_guard<std::mutex> guard(g_namespaces_mutex); Loading