diff options
Diffstat (limited to 'runtime/class_linker.h')
-rw-r--r-- | runtime/class_linker.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/runtime/class_linker.h b/runtime/class_linker.h index 205ea1e496..1e8125eb05 100644 --- a/runtime/class_linker.h +++ b/runtime/class_linker.h @@ -212,9 +212,7 @@ class ClassLinker { const char* descriptor, ObjPtr<mirror::ClassLoader> class_loader) REQUIRES(!Locks::classlinker_classes_lock_) - REQUIRES_SHARED(Locks::mutator_lock_) { - return LookupClass(self, descriptor, ComputeModifiedUtf8Hash(descriptor), class_loader); - } + REQUIRES_SHARED(Locks::mutator_lock_); // Finds all the classes with the given descriptor, regardless of ClassLoader. void LookupClasses(const char* descriptor, std::vector<ObjPtr<mirror::Class>>& classes) @@ -385,6 +383,13 @@ class ClassLinker { REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Locks::dex_lock_, !Roles::uninterruptible_); + // Directly register an already existing dex cache. RegisterDexFile should be preferred since that + // reduplicates DexCaches when possible. The DexCache given to this function must already be fully + // initialized and not already registered. + void RegisterExistingDexCache(ObjPtr<mirror::DexCache> cache, + ObjPtr<mirror::ClassLoader> class_loader) + REQUIRES(!Locks::dex_lock_) + REQUIRES_SHARED(Locks::mutator_lock_); ObjPtr<mirror::DexCache> RegisterDexFile(const DexFile& dex_file, ObjPtr<mirror::ClassLoader> class_loader) REQUIRES(!Locks::dex_lock_) |