summaryrefslogtreecommitdiff
path: root/runtime/native/java_lang_StringFactory.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_StringFactory.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_StringFactory.cc')
-rw-r--r--runtime/native/java_lang_StringFactory.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/native/java_lang_StringFactory.cc b/runtime/native/java_lang_StringFactory.cc
index 5a219efc7b..119f2b87ba 100644
--- a/runtime/native/java_lang_StringFactory.cc
+++ b/runtime/native/java_lang_StringFactory.cc
@@ -20,8 +20,8 @@
#include "jni_internal.h"
#include "mirror/object-inl.h"
#include "mirror/string.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 "ScopedLocalRef.h"
#include "ScopedPrimitiveArray.h"
@@ -35,7 +35,7 @@ static jstring StringFactory_newStringFromBytes(JNIEnv* env, jclass, jbyteArray
return nullptr;
}
StackHandleScope<1> hs(soa.Self());
- Handle<mirror::ByteArray> byte_array(hs.NewHandle(soa.Decode<mirror::ByteArray*>(java_data)));
+ Handle<mirror::ByteArray> byte_array(hs.NewHandle(soa.Decode<mirror::ByteArray>(java_data)));
int32_t data_size = byte_array->GetLength();
if ((offset | byte_count) < 0 || byte_count > data_size - offset) {
soa.Self()->ThrowNewExceptionF("Ljava/lang/StringIndexOutOfBoundsException;",
@@ -56,7 +56,7 @@ static jstring StringFactory_newStringFromChars(JNIEnv* env, jclass, jint offset
DCHECK(java_data != nullptr);
ScopedFastNativeObjectAccess soa(env);
StackHandleScope<1> hs(soa.Self());
- Handle<mirror::CharArray> char_array(hs.NewHandle(soa.Decode<mirror::CharArray*>(java_data)));
+ Handle<mirror::CharArray> char_array(hs.NewHandle(soa.Decode<mirror::CharArray>(java_data)));
gc::AllocatorType allocator_type = Runtime::Current()->GetHeap()->GetCurrentAllocator();
mirror::String* result = mirror::String::AllocFromCharArray<true>(soa.Self(), char_count,
char_array, offset,
@@ -71,7 +71,7 @@ static jstring StringFactory_newStringFromString(JNIEnv* env, jclass, jstring to
return nullptr;
}
StackHandleScope<1> hs(soa.Self());
- Handle<mirror::String> string(hs.NewHandle(soa.Decode<mirror::String*>(to_copy)));
+ Handle<mirror::String> string(hs.NewHandle(soa.Decode<mirror::String>(to_copy)));
gc::AllocatorType allocator_type = Runtime::Current()->GetHeap()->GetCurrentAllocator();
mirror::String* result = mirror::String::AllocFromString<true>(soa.Self(), string->GetLength(),
string, 0, allocator_type);