diff options
Diffstat (limited to 'runtime/native/java_lang_Thread.cc')
-rw-r--r-- | runtime/native/java_lang_Thread.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/runtime/native/java_lang_Thread.cc b/runtime/native/java_lang_Thread.cc index a742e812f7..063526150c 100644 --- a/runtime/native/java_lang_Thread.cc +++ b/runtime/native/java_lang_Thread.cc @@ -20,8 +20,8 @@ #include "jni_internal.h" #include "monitor.h" #include "mirror/object.h" -#include "scoped_fast_native_object_access.h" -#include "scoped_thread_state_change.h" +#include "scoped_fast_native_object_access-inl.h" +#include "scoped_thread_state_change-inl.h" #include "ScopedUtfChars.h" #include "thread.h" #include "thread_list.h" @@ -109,14 +109,14 @@ static jint Thread_nativeGetStatus(JNIEnv* env, jobject java_thread, jboolean ha static jboolean Thread_nativeHoldsLock(JNIEnv* env, jobject java_thread, jobject java_object) { ScopedObjectAccess soa(env); - mirror::Object* object = soa.Decode<mirror::Object*>(java_object); + ObjPtr<mirror::Object> object = soa.Decode<mirror::Object>(java_object); if (object == nullptr) { ThrowNullPointerException("object == null"); return JNI_FALSE; } MutexLock mu(soa.Self(), *Locks::thread_list_lock_); Thread* thread = Thread::FromManagedThread(soa, java_thread); - return thread->HoldsLock(object); + return thread->HoldsLock(object.Decode()); } static void Thread_nativeInterrupt(JNIEnv* env, jobject java_thread) { @@ -132,7 +132,7 @@ static void Thread_nativeSetName(JNIEnv* env, jobject peer, jstring java_name) { ScopedUtfChars name(env, java_name); { ScopedObjectAccess soa(env); - if (soa.Decode<mirror::Object*>(peer) == soa.Self()->GetPeer()) { + if (soa.Decode<mirror::Object>(peer) == soa.Self()->GetPeer()) { soa.Self()->SetThreadName(name.c_str()); return; } @@ -172,8 +172,8 @@ static void Thread_nativeSetPriority(JNIEnv* env, jobject java_thread, jint new_ static void Thread_sleep(JNIEnv* env, jclass, jobject java_lock, jlong ms, jint ns) { ScopedFastNativeObjectAccess soa(env); - mirror::Object* lock = soa.Decode<mirror::Object*>(java_lock); - Monitor::Wait(Thread::Current(), lock, ms, ns, true, kSleeping); + ObjPtr<mirror::Object> lock = soa.Decode<mirror::Object>(java_lock); + Monitor::Wait(Thread::Current(), lock.Decode(), ms, ns, true, kSleeping); } /* |