summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2017-08-30 16:43:54 +0100
committer Vladimir Marko <vmarko@google.com> 2017-08-30 18:31:06 +0100
commit5c3e9d1f60607420bb52fa8c9230967b9d9ea248 (patch)
tree896d3480f1fb992f78c3ecba8f221e2c94eb6fbf
parent80be041454871a9b72c39790a10954595d721a63 (diff)
ART: Clean up checks in CheckProxyMethod().
The non-proxy method, `np`, is always the same as the `prototype`, so it's not really worth comparing their members. That's been the case since https://android-review.googlesource.com/148090 . We've see the comparison of the return type hit a CHECK() failure for ObjPtr<> cookie. This can happen since https://android-review.googlesource.com/431679 if the return type is evicted from the DexCache and we go through the slow path. Test: m test-art-host-gtest Test: testrunner.py --host Bug: 30627598 Change-Id: I11f9ea86326be6ef9043ac5f170d74165ac11343
-rw-r--r--runtime/class_linker.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 1beb7837d4..93b6dd1dce 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -4692,14 +4692,8 @@ void ClassLinker::CheckProxyMethod(ArtMethod* method, ArtMethod* prototype) cons
// The proxy method doesn't have its own dex cache or dex file and so it steals those of its
// interface prototype. The exception to this are Constructors and the Class of the Proxy itself.
- auto* np = method->GetInterfaceMethodIfProxy(image_pointer_size_);
- CHECK_EQ(prototype->GetDeclaringClass()->GetDexCache(), np->GetDexCache());
CHECK_EQ(prototype->GetDexMethodIndex(), method->GetDexMethodIndex());
-
- CHECK_STREQ(np->GetName(), prototype->GetName());
- CHECK_STREQ(np->GetShorty(), prototype->GetShorty());
- // More complex sanity - via dex cache
- CHECK_EQ(np->ResolveReturnType(), prototype->ResolveReturnType());
+ CHECK_EQ(prototype, method->GetInterfaceMethodIfProxy(image_pointer_size_));
}
bool ClassLinker::CanWeInitializeClass(ObjPtr<mirror::Class> klass, bool can_init_statics,