diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-05-29 14:31:33 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-05-30 13:58:22 -0700 |
commit | b74cd29802f364b4cec88f4913fa38ade26b8fab (patch) | |
tree | 73ccdce1c5a6e57d5763cae1f889e53dca2b5e24 /runtime/native/java_lang_reflect_Array.cc | |
parent | 11138c73e0c5f8a90d1eeed3c48a2b63b310671c (diff) | |
download | android_art-b74cd29802f364b4cec88f4913fa38ade26b8fab.tar.gz android_art-b74cd29802f364b4cec88f4913fa38ade26b8fab.tar.bz2 android_art-b74cd29802f364b4cec88f4913fa38ade26b8fab.zip |
Compaction cleanup for FindArrayClass.
We now pass double pointer in to signify that it can cause thread
suspension, this double pointer gets wrapped by a handle if don't
find the array class in the cache.
Change-Id: I43436b6c35597c7252b65d1180baddb5ac4caabb
Diffstat (limited to 'runtime/native/java_lang_reflect_Array.cc')
-rw-r--r-- | runtime/native/java_lang_reflect_Array.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/native/java_lang_reflect_Array.cc b/runtime/native/java_lang_reflect_Array.cc index db77437db4..eae4584019 100644 --- a/runtime/native/java_lang_reflect_Array.cc +++ b/runtime/native/java_lang_reflect_Array.cc @@ -46,14 +46,14 @@ static jobject Array_createMultiArray(JNIEnv* env, jclass, jclass javaElementCla static jobject Array_createObjectArray(JNIEnv* env, jclass, jclass javaElementClass, jint length) { ScopedFastNativeObjectAccess soa(env); DCHECK(javaElementClass != NULL); - mirror::Class* element_class = soa.Decode<mirror::Class*>(javaElementClass); if (UNLIKELY(length < 0)) { ThrowNegativeArraySizeException(length); return NULL; } + mirror::Class* element_class = soa.Decode<mirror::Class*>(javaElementClass); Runtime* runtime = Runtime::Current(); ClassLinker* class_linker = runtime->GetClassLinker(); - mirror::Class* array_class = class_linker->FindArrayClass(soa.Self(), element_class); + mirror::Class* array_class = class_linker->FindArrayClass(soa.Self(), &element_class); if (UNLIKELY(array_class == NULL)) { CHECK(soa.Self()->IsExceptionPending()); return NULL; |