Merge "Return nullptr from FindNamespaceByClassLoader for NB-enabled apps." am: c54c533cf6
am: b870bbd69a
Change-Id: I15d9d46071941e871e332ae5ab83fc4a3b73042c
This commit is contained in:
commit
011074f0da
1 changed files with 4 additions and 4 deletions
|
|
@ -473,14 +473,14 @@ bool CloseNativeLibrary(void* handle, const bool needs_native_bridge) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__ANDROID__)
|
#if defined(__ANDROID__)
|
||||||
|
// native_bridge_namespaces are not supported for callers of this function.
|
||||||
|
// This function will return nullptr in the case when application is running
|
||||||
|
// on native bridge.
|
||||||
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);
|
||||||
// native_bridge_namespaces are not supported for callers of this function.
|
|
||||||
// At the moment this is libwebviewchromium_loader and vulkan.
|
|
||||||
NativeLoaderNamespace ns;
|
NativeLoaderNamespace ns;
|
||||||
if (g_namespaces->FindNamespaceByClassLoader(env, class_loader, &ns)) {
|
if (g_namespaces->FindNamespaceByClassLoader(env, class_loader, &ns)) {
|
||||||
CHECK(ns.is_android_namespace());
|
return ns.is_android_namespace() ? ns.get_android_ns() : nullptr;
|
||||||
return ns.get_android_ns();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue