ART: Address b/120022597
Follow-up to commit 4835d21a33b783869820c928bfc0a16f249d65f2. Clarify
template parameter.
Bug: 120022597
Test: m test-art-host
Change-Id: I0d7c5503bb0bb0bf87baf3d05ae284e85899fe1f
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 8d522f4..35b7707 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -8447,8 +8447,8 @@
return type;
}
-template <typename T>
-ObjPtr<mirror::Class> ClassLinker::DoResolveType(dex::TypeIndex type_idx, T referrer) {
+template <typename RefType>
+ObjPtr<mirror::Class> ClassLinker::DoResolveType(dex::TypeIndex type_idx, RefType referrer) {
StackHandleScope<2> hs(Thread::Current());
Handle<mirror::DexCache> dex_cache(hs.NewHandle(referrer->GetDexCache()));
Handle<mirror::ClassLoader> class_loader(hs.NewHandle(referrer->GetClassLoader()));
diff --git a/runtime/class_linker.h b/runtime/class_linker.h
index f3c3ef8..3605ffb 100644
--- a/runtime/class_linker.h
+++ b/runtime/class_linker.h
@@ -945,9 +945,10 @@
ObjPtr<mirror::DexCache> dex_cache)
REQUIRES_SHARED(Locks::mutator_lock_);
- // Implementation of ResolveType() called when the type was not found in the dex cache.
- template <typename T>
- ObjPtr<mirror::Class> DoResolveType(dex::TypeIndex type_idx, T referrer)
+ // Implementation of ResolveType() called when the type was not found in the dex cache. May be
+ // used with ArtField*, ArtMethod* or ObjPtr<Class>.
+ template <typename RefType>
+ ObjPtr<mirror::Class> DoResolveType(dex::TypeIndex type_idx, RefType referrer)
REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Locks::dex_lock_, !Roles::uninterruptible_);
ObjPtr<mirror::Class> DoResolveType(dex::TypeIndex type_idx,