summaryrefslogtreecommitdiff
path: root/runtime/native/java_lang_Object.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2016-09-27 18:43:30 -0700
committerMathieu Chartier <mathieuc@google.com>2016-09-29 17:31:09 -0700
commit0795f23920ee9aabf28e45c63cd592dcccf00216 (patch)
treeff3f880c5e84f3316532b47d0e9a7729ade848ac /runtime/native/java_lang_Object.cc
parentd1224dce59eb0019507e41da5e10f12dda66bee4 (diff)
Clean up ScopedThreadStateChange to use ObjPtr
Also fixed inclusion of -inl.h files in .h files by adding scoped_object_access-inl.h and scoped_fast_natvie_object_access-inl.h Changed AddLocalReference / Decode to use ObjPtr. Changed libartbenchmark to be debug to avoid linkage errors. Bug: 31113334 Test: test-art-host Change-Id: I4d2e160483a29d21e1e0e440585ed328b9811483
Diffstat (limited to 'runtime/native/java_lang_Object.cc')
-rw-r--r--runtime/native/java_lang_Object.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/runtime/native/java_lang_Object.cc b/runtime/native/java_lang_Object.cc
index 2a36059a17..6493865c99 100644
--- a/runtime/native/java_lang_Object.cc
+++ b/runtime/native/java_lang_Object.cc
@@ -18,39 +18,35 @@
#include "jni_internal.h"
#include "mirror/object-inl.h"
-#include "scoped_fast_native_object_access.h"
+#include "scoped_fast_native_object_access-inl.h"
namespace art {
static jobject Object_internalClone(JNIEnv* env, jobject java_this) {
ScopedFastNativeObjectAccess soa(env);
- mirror::Object* o = soa.Decode<mirror::Object*>(java_this);
+ ObjPtr<mirror::Object> o = soa.Decode<mirror::Object>(java_this);
return soa.AddLocalReference<jobject>(o->Clone(soa.Self()));
}
static void Object_notify(JNIEnv* env, jobject java_this) {
ScopedFastNativeObjectAccess soa(env);
- mirror::Object* o = soa.Decode<mirror::Object*>(java_this);
- o->Notify(soa.Self());
+ soa.Decode<mirror::Object>(java_this)->Notify(soa.Self());
}
static void Object_notifyAll(JNIEnv* env, jobject java_this) {
ScopedFastNativeObjectAccess soa(env);
- mirror::Object* o = soa.Decode<mirror::Object*>(java_this);
- o->NotifyAll(soa.Self());
+ soa.Decode<mirror::Object>(java_this)->NotifyAll(soa.Self());
}
static void Object_wait(JNIEnv* env, jobject java_this) {
ScopedFastNativeObjectAccess soa(env);
- mirror::Object* o = soa.Decode<mirror::Object*>(java_this);
- o->Wait(soa.Self());
+ soa.Decode<mirror::Object>(java_this)->Wait(soa.Self());
}
static void Object_waitJI(JNIEnv* env, jobject java_this, jlong ms, jint ns) {
ScopedFastNativeObjectAccess soa(env);
- mirror::Object* o = soa.Decode<mirror::Object*>(java_this);
- o->Wait(soa.Self(), ms, ns);
+ soa.Decode<mirror::Object>(java_this)->Wait(soa.Self(), ms, ns);
}
static JNINativeMethod gMethods[] = {