summaryrefslogtreecommitdiffstats
path: root/runtime/well_known_classes.cc
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2016-11-07 16:48:23 -0800
committerAndreas Gampe <agampe@google.com>2016-11-07 19:45:48 -0800
commit13b27842e88ccf1a42807c92daeb108e867dc4cd (patch)
treed95968f678070058ec084376d561c7ed4f1bcff3 /runtime/well_known_classes.cc
parent689a331aded82340d2ab144d0adb9bbbbd4b53ff (diff)
downloadart-13b27842e88ccf1a42807c92daeb108e867dc4cd.tar.gz
art-13b27842e88ccf1a42807c92daeb108e867dc4cd.tar.bz2
art-13b27842e88ccf1a42807c92daeb108e867dc4cd.zip
ART: Refactor jmethodID handling
ArtMethod objects have been native since Marshmallow. Remove the dependency on being runnable. Refactor the code into the jni_internal header. Test: m test-art-host Change-Id: I1385fcd4c08981491701da55a87036b447aa2fc2
Diffstat (limited to 'runtime/well_known_classes.cc')
-rw-r--r--runtime/well_known_classes.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/well_known_classes.cc b/runtime/well_known_classes.cc
index 53d717a8ff..3e35219e48 100644
--- a/runtime/well_known_classes.cc
+++ b/runtime/well_known_classes.cc
@@ -22,6 +22,7 @@
#include "base/logging.h"
#include "entrypoints/quick/quick_entrypoints_enum.h"
+#include "jni_internal.h"
#include "mirror/class.h"
#include "mirror/throwable.h"
#include "obj_ptr-inl.h"
@@ -219,9 +220,9 @@ void WellKnownClasses::InitStringInit(JNIEnv* env) {
ScopedObjectAccess soa(Thread::Current());
#define LOAD_STRING_INIT(init_runtime_name, init_signature, new_runtime_name, \
new_java_name, new_signature, ...) \
- init_runtime_name = soa.DecodeMethod( \
+ init_runtime_name = jni::DecodeArtMethod( \
CacheMethod(env, java_lang_String, false, "<init>", init_signature)); \
- new_runtime_name = soa.DecodeMethod( \
+ new_runtime_name = jni::DecodeArtMethod( \
CacheMethod(env, java_lang_StringFactory, true, new_java_name, new_signature));
STRING_INIT_LIST(LOAD_STRING_INIT)
#undef LOAD_STRING_INIT