diff options
| author | 2017-06-05 18:03:23 +0000 | |
|---|---|---|
| committer | 2017-06-05 18:03:24 +0000 | |
| commit | 81c769436a89b25c781eb2da882f11fd8d11f84d (patch) | |
| tree | eb7d10728981bf0ee5f16502ce949d823030504d /runtime/class_linker.h | |
| parent | 8c4fd14f714900190bd2024aa07495e874520da6 (diff) | |
| parent | 07f0621463e7b480c86ddba3e72d3fb9f0ae820f (diff) | |
Merge "Fix redefinition related use-after-free bug"
Diffstat (limited to 'runtime/class_linker.h')
| -rw-r--r-- | runtime/class_linker.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/class_linker.h b/runtime/class_linker.h index 205ea1e496..fad6e9ebbf 100644 --- a/runtime/class_linker.h +++ b/runtime/class_linker.h @@ -385,6 +385,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_) |