diff options
author | Mathieu Chartier <mathieuc@google.com> | 2015-07-10 18:26:41 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2015-07-11 15:31:26 -0700 |
commit | 997673870a487baa136f1b13f81ae26dd3005e14 (patch) | |
tree | a3699812d1bce24da0c08b8268c0cc5195fd29bf /runtime | |
parent | 25e1af5b4e1ce7e03a188ca1d0197a9f5b6acaf8 (diff) | |
download | art-997673870a487baa136f1b13f81ae26dd3005e14.zip art-997673870a487baa136f1b13f81ae26dd3005e14.tar.gz art-997673870a487baa136f1b13f81ae26dd3005e14.tar.bz2 |
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')
-rw-r--r-- | runtime/mirror/class.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc index f0b7bfd..5bd6583 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; } } |