Address review comments on method resolution.

Follow-up after:
https://android-review.googlesource.com/c/platform/art/+/1825135

Test: 827-resolve-method
Bug: 199246839
Change-Id: I085348040308d70730bd7f90bd3aa8ded5113087
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index f94bffd..97e22d0 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -8867,7 +8867,7 @@
 ObjPtr<mirror::Class> ClassLinker::DoLookupResolvedType(dex::TypeIndex type_idx,
                                                         ObjPtr<mirror::DexCache> dex_cache,
                                                         ObjPtr<mirror::ClassLoader> class_loader) {
-  DCHECK(dex_cache->GetClassLoader().Ptr() == class_loader.Ptr());
+  DCHECK(dex_cache->GetClassLoader() == class_loader);
   const DexFile& dex_file = *dex_cache->GetDexFile();
   const char* descriptor = dex_file.StringByTypeIdx(type_idx);
   ObjPtr<mirror::Class> type = LookupResolvedType(descriptor, class_loader);
@@ -8915,7 +8915,7 @@
 ObjPtr<mirror::Class> ClassLinker::DoResolveType(dex::TypeIndex type_idx,
                                                  Handle<mirror::DexCache> dex_cache,
                                                  Handle<mirror::ClassLoader> class_loader) {
-  DCHECK(dex_cache->GetClassLoader().Ptr() == class_loader.Get());
+  DCHECK(dex_cache->GetClassLoader() == class_loader.Get());
   Thread* self = Thread::Current();
   const char* descriptor = dex_cache->GetDexFile()->StringByTypeIdx(type_idx);
   ObjPtr<mirror::Class> resolved = FindClass(self, descriptor, class_loader);
@@ -8946,7 +8946,7 @@
                                            ObjPtr<mirror::DexCache> dex_cache,
                                            ObjPtr<mirror::ClassLoader> class_loader,
                                            uint32_t method_idx) {
-  DCHECK(dex_cache->GetClassLoader().Ptr() == class_loader.Ptr());
+  DCHECK(dex_cache->GetClassLoader() == class_loader);
   // Search for the method using dex_cache and method_idx. The Class::Find*Method()
   // functions can optimize the search if the dex_cache is the same as the DexCache
   // of the class, with fall-back to name and signature search otherwise.
@@ -9018,7 +9018,7 @@
                                                ObjPtr<mirror::DexCache> dex_cache,
                                                ObjPtr<mirror::ClassLoader> class_loader,
                                                uint32_t method_idx) {
-  DCHECK(dex_cache->GetClassLoader().Ptr() == class_loader.Ptr());
+  DCHECK(dex_cache->GetClassLoader() == class_loader);
   if (klass->IsInterface()) {
     ArtMethod* method = klass->FindClassMethod(dex_cache, method_idx, image_pointer_size_);
     return CheckNoSuchMethod(method, dex_cache, class_loader) ? nullptr : method;
@@ -9041,7 +9041,7 @@
                                       Handle<mirror::ClassLoader> class_loader,
                                       ArtMethod* referrer,
                                       InvokeType type) {
-  DCHECK(dex_cache->GetClassLoader().Ptr() == class_loader.Get());
+  DCHECK(dex_cache->GetClassLoader() == class_loader.Get());
   DCHECK(!Thread::Current()->IsExceptionPending()) << Thread::Current()->GetException()->Dump();
   DCHECK(dex_cache != nullptr);
   DCHECK(referrer == nullptr || !referrer->IsProxyMethod());
@@ -9136,7 +9136,7 @@
 ArtMethod* ClassLinker::ResolveMethodWithoutInvokeType(uint32_t method_idx,
                                                        Handle<mirror::DexCache> dex_cache,
                                                        Handle<mirror::ClassLoader> class_loader) {
-  DCHECK(dex_cache->GetClassLoader().Ptr() == class_loader.Get());
+  DCHECK(dex_cache->GetClassLoader() == class_loader.Get());
   ArtMethod* resolved = dex_cache->GetResolvedMethod(method_idx);
   Thread::PoisonObjectPointersIfDebug();
   if (resolved != nullptr) {
@@ -9219,7 +9219,7 @@
                                        Handle<mirror::DexCache> dex_cache,
                                        Handle<mirror::ClassLoader> class_loader) {
   DCHECK(dex_cache != nullptr);
-  DCHECK(dex_cache->GetClassLoader().Ptr() == class_loader.Get());
+  DCHECK(dex_cache->GetClassLoader() == class_loader.Get());
   ArtField* resolved = dex_cache->GetResolvedField(field_idx);
   Thread::PoisonObjectPointersIfDebug();
   if (resolved != nullptr) {
@@ -9247,7 +9247,7 @@
                                          ObjPtr<mirror::ClassLoader> class_loader,
                                          uint32_t field_idx,
                                          bool is_static) {
-  DCHECK(dex_cache->GetClassLoader().Ptr() == class_loader.Ptr());
+  DCHECK(dex_cache->GetClassLoader() == class_loader);
   ArtField* resolved = is_static ? klass->FindStaticField(dex_cache, field_idx)
                                  : klass->FindInstanceField(dex_cache, field_idx);
   if (resolved != nullptr &&
@@ -9292,7 +9292,7 @@
     Handle<mirror::ClassLoader> class_loader) {
   DCHECK(Runtime::Current()->IsMethodHandlesEnabled());
   DCHECK(dex_cache != nullptr);
-  DCHECK(dex_cache->GetClassLoader().Ptr() == class_loader.Get());
+  DCHECK(dex_cache->GetClassLoader() == class_loader.Get());
 
   ObjPtr<mirror::MethodType> resolved = dex_cache->GetResolvedMethodType(proto_idx);
   if (resolved != nullptr) {