summaryrefslogtreecommitdiffstats
path: root/runtime/mirror
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2015-07-10 18:26:41 -0700
committerMathieu Chartier <mathieuc@google.com>2015-07-11 15:31:26 -0700
commit997673870a487baa136f1b13f81ae26dd3005e14 (patch)
treea3699812d1bce24da0c08b8268c0cc5195fd29bf /runtime/mirror
parent25e1af5b4e1ce7e03a188ca1d0197a9f5b6acaf8 (diff)
downloadart-997673870a487baa136f1b13f81ae26dd3005e14.tar.gz
art-997673870a487baa136f1b13f81ae26dd3005e14.tar.bz2
art-997673870a487baa136f1b13f81ae26dd3005e14.zip
Fix proxy handling in FindDeclaredVirtualMethod
Added missing GetInterfaceMethodIfProxy and test. Fixed formatting. Bug: 22411819 https://code.google.com/p/android-developer-preview/issues/detail?id=2635 (cherry picked from commit 72156e28fd6bc72ac965b29446f8801b2e82f2fd) Change-Id: I3eece9c72091bb9d0262aacf0a75ec6908b5f4d2
Diffstat (limited to 'runtime/mirror')
-rw-r--r--runtime/mirror/class.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc
index f0b7bfddea..5bd65837d8 100644
--- a/runtime/mirror/class.cc
+++ b/runtime/mirror/class.cc
@@ -471,7 +471,8 @@ ArtMethod* Class::FindDirectMethod(
ArtMethod* Class::FindDeclaredVirtualMethod(const StringPiece& name, const StringPiece& signature,
size_t pointer_size) {
for (auto& method : GetVirtualMethods(pointer_size)) {
- if (name == method.GetName() && method.GetSignature() == signature) {
+ ArtMethod* const np_method = method.GetInterfaceMethodIfProxy(pointer_size);
+ if (name == np_method->GetName() && np_method->GetSignature() == signature) {
return &method;
}
}
@@ -481,7 +482,8 @@ ArtMethod* Class::FindDeclaredVirtualMethod(const StringPiece& name, const Strin
ArtMethod* Class::FindDeclaredVirtualMethod(const StringPiece& name, const Signature& signature,
size_t pointer_size) {
for (auto& method : GetVirtualMethods(pointer_size)) {
- if (name == method.GetName() && signature == method.GetSignature()) {
+ ArtMethod* const np_method = method.GetInterfaceMethodIfProxy(pointer_size);
+ if (name == np_method->GetName() && signature == np_method->GetSignature()) {
return &method;
}
}