summaryrefslogtreecommitdiff
path: root/runtime/class_linker.h
diff options
context:
space:
mode:
author Brad Stenning <stenning@google.com> 2021-10-11 19:09:00 -0700
committer Treehugger Robot <treehugger-gerrit@google.com> 2021-10-26 17:36:32 +0000
commit9c924e89e5f52da9faadd1e4e60c73eaed6bc9d1 (patch)
tree8ffdc7f0c144cb392b50144a9ae9cb4ac4d3cca7 /runtime/class_linker.h
parentd690f8ae8f8e2675bc52089a83ac18c749f8e6d2 (diff)
Add support to place shared libraries after the dex path
This allows for a shared library to overriden by content in the dex path Bug: 179429740 Test: m test-art-host-gtest-art_runtime_tests32 Change-Id: I5f69c7bf32b7bd389eff8bdbb21616ba89ed9e87
Diffstat (limited to 'runtime/class_linker.h')
-rw-r--r--runtime/class_linker.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/runtime/class_linker.h b/runtime/class_linker.h
index 8f334051ca..eaaf128527 100644
--- a/runtime/class_linker.h
+++ b/runtime/class_linker.h
@@ -665,7 +665,8 @@ class ClassLinker {
const std::vector<const DexFile*>& dex_files,
jclass loader_class,
jobject parent_loader,
- jobject shared_libraries = nullptr)
+ jobject shared_libraries = nullptr,
+ jobject shared_libraries_after = nullptr)
REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Locks::dex_lock_);
@@ -683,7 +684,8 @@ class ClassLinker {
const std::vector<const DexFile*>& dex_files,
Handle<mirror::Class> loader_class,
Handle<mirror::ClassLoader> parent_loader,
- Handle<mirror::ObjectArray<mirror::ClassLoader>> shared_libraries)
+ Handle<mirror::ObjectArray<mirror::ClassLoader>> shared_libraries,
+ Handle<mirror::ObjectArray<mirror::ClassLoader>> shared_libraries_after)
REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Locks::dex_lock_);
@@ -1015,6 +1017,25 @@ class ClassLinker {
REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Locks::dex_lock_);
+ bool FindClassInSharedLibrariesHelper(ScopedObjectAccessAlreadyRunnable& soa,
+ Thread* self,
+ const char* descriptor,
+ size_t hash,
+ Handle<mirror::ClassLoader> class_loader,
+ ArtField* field,
+ /*out*/ ObjPtr<mirror::Class>* result)
+ REQUIRES_SHARED(Locks::mutator_lock_)
+ REQUIRES(!Locks::dex_lock_);
+
+ bool FindClassInSharedLibrariesAfter(ScopedObjectAccessAlreadyRunnable& soa,
+ Thread* self,
+ const char* descriptor,
+ size_t hash,
+ Handle<mirror::ClassLoader> class_loader,
+ /*out*/ ObjPtr<mirror::Class>* result)
+ REQUIRES_SHARED(Locks::mutator_lock_)
+ REQUIRES(!Locks::dex_lock_);
+
// Finds the class in the classpath of the given class loader. It only searches the class loader
// dex files and does not recurse into its parent.
// The method checks that the provided class loader is either a PathClassLoader or a