diff options
author | 2015-12-15 15:02:47 -0800 | |
---|---|---|
committer | 2015-12-16 14:16:31 -0800 | |
commit | e64300b8488716056775ecbfa2915dd1b4ce7e08 (patch) | |
tree | be23a7086c1e369527dda5450a9868f2d29c5669 /runtime/native_bridge_art_interface.cc | |
parent | bc90a0538e56f98b8e138cb622e6b9d834244ad9 (diff) |
Revert "Revert "Combine direct_methods_ and virtual_methods_ fields of mirror::Class""
This reverts commit ae358c1d5cef227b44d6f4971b79e1ab91aa26eb.
Bug: 24618811
Change-Id: I8becf9bae3258450b90cfef5e79589db7c535a4d
Diffstat (limited to 'runtime/native_bridge_art_interface.cc')
-rw-r--r-- | runtime/native_bridge_art_interface.cc | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/runtime/native_bridge_art_interface.cc b/runtime/native_bridge_art_interface.cc index 46cc5aaff8..61a1085c0e 100644 --- a/runtime/native_bridge_art_interface.cc +++ b/runtime/native_bridge_art_interface.cc @@ -45,10 +45,7 @@ static uint32_t GetNativeMethodCount(JNIEnv* env, jclass clazz) { mirror::Class* c = soa.Decode<mirror::Class*>(clazz); uint32_t native_method_count = 0; - for (auto& m : c->GetDirectMethods(sizeof(void*))) { - native_method_count += m.IsNative() ? 1u : 0u; - } - for (auto& m : c->GetVirtualMethods(sizeof(void*))) { + for (auto& m : c->GetMethods(sizeof(void*))) { native_method_count += m.IsNative() ? 1u : 0u; } return native_method_count; @@ -63,19 +60,7 @@ static uint32_t GetNativeMethods(JNIEnv* env, jclass clazz, JNINativeMethod* met mirror::Class* c = soa.Decode<mirror::Class*>(clazz); uint32_t count = 0; - for (auto& m : c->GetDirectMethods(sizeof(void*))) { - if (m.IsNative()) { - if (count < method_count) { - methods[count].name = m.GetName(); - methods[count].signature = m.GetShorty(); - methods[count].fnPtr = m.GetEntryPointFromJni(); - count++; - } else { - LOG(WARNING) << "Output native method array too small. Skipping " << PrettyMethod(&m); - } - } - } - for (auto& m : c->GetVirtualMethods(sizeof(void*))) { + for (auto& m : c->GetMethods(sizeof(void*))) { if (m.IsNative()) { if (count < method_count) { methods[count].name = m.GetName(); |