diff options
author | Mathieu Chartier <mathieuc@google.com> | 2015-06-11 16:21:42 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2015-06-11 16:43:02 -0700 |
commit | b89a8c66e360575d2dc1ec1229235735c56968ff (patch) | |
tree | 536d84933d1f634db134a16278a3a2fdafac1907 /runtime | |
parent | 125d7324f1f75698ed20b2f64c36345d7f0bcabf (diff) | |
download | art-b89a8c66e360575d2dc1ec1229235735c56968ff.zip art-b89a8c66e360575d2dc1ec1229235735c56968ff.tar.gz art-b89a8c66e360575d2dc1ec1229235735c56968ff.tar.bz2 |
Fix compaction bug in Class_getDeclaredMethodsUnchecked
Added handle to fix the bug.
Bug: 21638351
Change-Id: I1c3abea33aa825d3a28c1fc5cb415508686ad93e
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/native/java_lang_Class.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/native/java_lang_Class.cc b/runtime/native/java_lang_Class.cc index 94024ef..67dcc9c 100644 --- a/runtime/native/java_lang_Class.cc +++ b/runtime/native/java_lang_Class.cc @@ -380,8 +380,8 @@ static jobject Class_getDeclaredMethodInternal(JNIEnv* env, jobject javaThis, static jobjectArray Class_getDeclaredMethodsUnchecked(JNIEnv* env, jobject javaThis, jboolean publicOnly) { ScopedFastNativeObjectAccess soa(env); - StackHandleScope<3> hs(soa.Self()); - auto* klass = DecodeClass(soa, javaThis); + StackHandleScope<2> hs(soa.Self()); + auto klass = hs.NewHandle(DecodeClass(soa, javaThis)); size_t num_methods = 0; for (auto& m : klass->GetVirtualMethods(sizeof(void*))) { auto modifiers = m.GetAccessFlags(); |