diff options
author | 2022-11-23 14:24:45 +0000 | |
---|---|---|
committer | 2022-11-29 08:41:31 +0000 | |
commit | b6f965d2967c77cdf8f4bff26b838ee6a5ca6d1a (patch) | |
tree | d66a451156965da02d8374e4658a21f5d542d304 /runtime/class_linker.h | |
parent | e22e84bd127520b33d56bf0ad62aa2b99be06de3 (diff) |
Change well known class loader methods to `ArtMethod*`.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: atest CtsJdwpTestCases
Change-Id: I7b94a481304f8899bcb828ed5875fe165dd90dda
Diffstat (limited to 'runtime/class_linker.h')
-rw-r--r-- | runtime/class_linker.h | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/runtime/class_linker.h b/runtime/class_linker.h index 5f674b855a..37e9979395 100644 --- a/runtime/class_linker.h +++ b/runtime/class_linker.h @@ -670,31 +670,19 @@ class ClassLinker { REQUIRES(!Locks::classlinker_classes_lock_) REQUIRES_SHARED(Locks::mutator_lock_); - // Creates a GlobalRef PathClassLoader or DelegateLastClassLoader (specified by loader_class) - // that can be used to load classes from the given dex files. The parent of the class loader - // will be set to `parent_loader`. If `parent_loader` is null the parent will be - // the boot class loader. - // If class_loader points to a different class than PathClassLoader or DelegateLastClassLoader - // this method will abort. - // Note: the objects are not completely set up. Do not use this outside of tests and the compiler. - jobject CreateWellKnownClassLoader(Thread* self, - const std::vector<const DexFile*>& dex_files, - jclass loader_class, - jobject parent_loader, - jobject shared_libraries = nullptr, - jobject shared_libraries_after = nullptr) - REQUIRES_SHARED(Locks::mutator_lock_) - REQUIRES(!Locks::dex_lock_); - - // Calls CreateWellKnownClassLoader(self, - // dex_files, - // WellKnownClasses::dalvik_system_PathClassLoader, - // nullptr) + // Calls `CreateWellKnownClassLoader()` with `WellKnownClasses::dalvik_system_PathClassLoader`, + // and null parent and libraries. Wraps the result in a JNI global reference. jobject CreatePathClassLoader(Thread* self, const std::vector<const DexFile*>& dex_files) REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Locks::dex_lock_); - // Non-GlobalRef version of CreateWellKnownClassLoader + // Creates a `PathClassLoader`, `DelegateLastClassLoader` or `InMemoryDexClassLoader` + // (specified by loader_class) that can be used to load classes from the given dex files. + // The parent of the class loader will be set to `parent_loader`. If `parent_loader` is + // null the parent will be the boot class loader. + // If `loader_class` points to a different class than `PathClassLoader`, + // `DelegateLastClassLoader` or `InMemoryDexClassLoader` this method will abort. + // Note: the objects are not completely set up. Do not use this outside of tests and the compiler. ObjPtr<mirror::ClassLoader> CreateWellKnownClassLoader( Thread* self, const std::vector<const DexFile*>& dex_files, |