summaryrefslogtreecommitdiff
path: root/runtime/class_linker.h
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2017-06-05 18:03:23 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-06-05 18:03:24 +0000
commit81c769436a89b25c781eb2da882f11fd8d11f84d (patch)
treeeb7d10728981bf0ee5f16502ce949d823030504d /runtime/class_linker.h
parent8c4fd14f714900190bd2024aa07495e874520da6 (diff)
parent07f0621463e7b480c86ddba3e72d3fb9f0ae820f (diff)
Merge "Fix redefinition related use-after-free bug"
Diffstat (limited to 'runtime/class_linker.h')
-rw-r--r--runtime/class_linker.h7
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_)