summaryrefslogtreecommitdiff
path: root/runtime/native/dalvik_system_VMRuntime.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2016-09-27 18:43:30 -0700
committer Mathieu Chartier <mathieuc@google.com> 2016-09-29 17:31:09 -0700
commit0795f23920ee9aabf28e45c63cd592dcccf00216 (patch)
treeff3f880c5e84f3316532b47d0e9a7729ade848ac /runtime/native/dalvik_system_VMRuntime.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/dalvik_system_VMRuntime.cc')
-rw-r--r--runtime/native/dalvik_system_VMRuntime.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/native/dalvik_system_VMRuntime.cc b/runtime/native/dalvik_system_VMRuntime.cc
index d88c9d4750..c7fb44ecec 100644
--- a/runtime/native/dalvik_system_VMRuntime.cc
+++ b/runtime/native/dalvik_system_VMRuntime.cc
@@ -46,8 +46,8 @@ extern "C" void android_set_application_target_sdk_version(uint32_t version);
#include "mirror/dex_cache-inl.h"
#include "mirror/object-inl.h"
#include "runtime.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 "thread.h"
#include "thread_list.h"
@@ -74,7 +74,7 @@ static jobject VMRuntime_newNonMovableArray(JNIEnv* env, jobject, jclass javaEle
ThrowNegativeArraySizeException(length);
return nullptr;
}
- mirror::Class* element_class = soa.Decode<mirror::Class*>(javaElementClass);
+ mirror::Class* element_class = soa.Decode<mirror::Class>(javaElementClass).Decode();
if (UNLIKELY(element_class == nullptr)) {
ThrowNullPointerException("element class == null");
return nullptr;
@@ -99,7 +99,7 @@ static jobject VMRuntime_newUnpaddedArray(JNIEnv* env, jobject, jclass javaEleme
ThrowNegativeArraySizeException(length);
return nullptr;
}
- mirror::Class* element_class = soa.Decode<mirror::Class*>(javaElementClass);
+ mirror::Class* element_class = soa.Decode<mirror::Class>(javaElementClass).Decode();
if (UNLIKELY(element_class == nullptr)) {
ThrowNullPointerException("element class == null");
return nullptr;
@@ -122,12 +122,12 @@ static jlong VMRuntime_addressOf(JNIEnv* env, jobject, jobject javaArray) {
return 0;
}
ScopedFastNativeObjectAccess soa(env);
- mirror::Array* array = soa.Decode<mirror::Array*>(javaArray);
+ ObjPtr<mirror::Array> array = soa.Decode<mirror::Array>(javaArray);
if (!array->IsArrayInstance()) {
ThrowIllegalArgumentException("not an array");
return 0;
}
- if (Runtime::Current()->GetHeap()->IsMovableObject(array)) {
+ if (Runtime::Current()->GetHeap()->IsMovableObject(array.Decode())) {
ThrowRuntimeException("Trying to get address of movable array object");
return 0;
}