diff options
author | Andreas Gampe <agampe@google.com> | 2015-09-08 17:42:59 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-10-12 17:41:50 -0700 |
commit | f015c2f4835a9985a8b31cfc810129b69865a6c4 (patch) | |
tree | c4adc26ed61fc2bb04cec2e5a5b99d79da4a0801 /runtime | |
parent | 2602aa86d8e0e98f00311ea05395548b4d327f82 (diff) | |
download | art-f015c2f4835a9985a8b31cfc810129b69865a6c4.zip art-f015c2f4835a9985a8b31cfc810129b69865a6c4.tar.gz art-f015c2f4835a9985a8b31cfc810129b69865a6c4.tar.bz2 |
ART: Add missing GetInterfaceMethodIfProxy
Add missing uses of GetInterfaceMethodIfProxy in reflection code.
Add a test case for a JNI call to a proxy method.
Bug: https://code.google.com/p/android-developer-preview/issues/detail?id=2973
Bug: 23886441
(cherry picked from commit e80673245c0433a71a4930e460be5dc0920885b2)
Change-Id: I5b66b64b5561fcee15d0314707d67e8abc02ce5b
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/reflection.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/reflection.cc b/runtime/reflection.cc index 11522d9..db09afb 100644 --- a/runtime/reflection.cc +++ b/runtime/reflection.cc @@ -453,7 +453,7 @@ JValue InvokeWithVarArgs(const ScopedObjectAccessAlreadyRunnable& soa, jobject o } mirror::Object* receiver = method->IsStatic() ? nullptr : soa.Decode<mirror::Object*>(obj); uint32_t shorty_len = 0; - const char* shorty = method->GetShorty(&shorty_len); + const char* shorty = method->GetInterfaceMethodIfProxy(sizeof(void*))->GetShorty(&shorty_len); JValue result; ArgArray arg_array(shorty, shorty_len); arg_array.BuildArgArrayFromVarArgs(soa, receiver, args); @@ -483,7 +483,7 @@ JValue InvokeWithJValues(const ScopedObjectAccessAlreadyRunnable& soa, jobject o } mirror::Object* receiver = method->IsStatic() ? nullptr : soa.Decode<mirror::Object*>(obj); uint32_t shorty_len = 0; - const char* shorty = method->GetShorty(&shorty_len); + const char* shorty = method->GetInterfaceMethodIfProxy(sizeof(void*))->GetShorty(&shorty_len); JValue result; ArgArray arg_array(shorty, shorty_len); arg_array.BuildArgArrayFromJValues(soa, receiver, args); @@ -514,7 +514,7 @@ JValue InvokeVirtualOrInterfaceWithJValues(const ScopedObjectAccessAlreadyRunnab receiver = nullptr; } uint32_t shorty_len = 0; - const char* shorty = method->GetShorty(&shorty_len); + const char* shorty = method->GetInterfaceMethodIfProxy(sizeof(void*))->GetShorty(&shorty_len); JValue result; ArgArray arg_array(shorty, shorty_len); arg_array.BuildArgArrayFromJValues(soa, receiver, args); @@ -545,7 +545,7 @@ JValue InvokeVirtualOrInterfaceWithVarArgs(const ScopedObjectAccessAlreadyRunnab receiver = nullptr; } uint32_t shorty_len = 0; - const char* shorty = method->GetShorty(&shorty_len); + const char* shorty = method->GetInterfaceMethodIfProxy(sizeof(void*))->GetShorty(&shorty_len); JValue result; ArgArray arg_array(shorty, shorty_len); arg_array.BuildArgArrayFromVarArgs(soa, receiver, args); |