summaryrefslogtreecommitdiffstats
path: root/runtime/mirror
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-04-22 11:42:59 -0700
committerIan Rogers <irogers@google.com>2014-04-22 14:52:19 -0700
commit987560fee798e48fb725c44b796d8ca7a5872ad6 (patch)
treed61f35a129847f3f5fbed1436649e75acd940b3f /runtime/mirror
parent44b0053fdb7ad8a30138d29f714172a7dc69efb8 (diff)
downloadart-987560fee798e48fb725c44b796d8ca7a5872ad6.tar.gz
art-987560fee798e48fb725c44b796d8ca7a5872ad6.tar.bz2
art-987560fee798e48fb725c44b796d8ca7a5872ad6.zip
Remove support for app JNI workarounds.
Change-Id: I4396df7e93fcace4b5b19c2c387e5c30089182a6
Diffstat (limited to 'runtime/mirror')
-rw-r--r--runtime/mirror/art_method.cc21
1 files changed, 3 insertions, 18 deletions
diff --git a/runtime/mirror/art_method.cc b/runtime/mirror/art_method.cc
index ee5a0a4060..c99834621c 100644
--- a/runtime/mirror/art_method.cc
+++ b/runtime/mirror/art_method.cc
@@ -342,30 +342,15 @@ bool ArtMethod::IsRegistered() {
return native_method != jni_stub;
}
-extern "C" void art_work_around_app_jni_bugs(JNIEnv*, jobject);
void ArtMethod::RegisterNative(Thread* self, const void* native_method, bool is_fast) {
DCHECK(Thread::Current() == self);
CHECK(IsNative()) << PrettyMethod(this);
CHECK(!IsFastNative()) << PrettyMethod(this);
CHECK(native_method != NULL) << PrettyMethod(this);
- if (!self->GetJniEnv()->vm->work_around_app_jni_bugs) {
- if (is_fast) {
- SetAccessFlags(GetAccessFlags() | kAccFastNative);
- }
- SetNativeMethod(native_method);
- } else {
- // We've been asked to associate this method with the given native method but are working
- // around JNI bugs, that include not giving Object** SIRT references to native methods. Direct
- // the native method to runtime support and store the target somewhere runtime support will
- // find it.
-#if defined(__i386__) || defined(__x86_64__)
- UNIMPLEMENTED(FATAL);
-#else
- SetNativeMethod(reinterpret_cast<void*>(art_work_around_app_jni_bugs));
-#endif
- SetFieldPtr<false>(OFFSET_OF_OBJECT_MEMBER(ArtMethod, gc_map_),
- reinterpret_cast<const uint8_t*>(native_method), false);
+ if (is_fast) {
+ SetAccessFlags(GetAccessFlags() | kAccFastNative);
}
+ SetNativeMethod(native_method);
}
void ArtMethod::UnregisterNative(Thread* self) {