OSDN Git Service
(root)
/
android-x86
/
art.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d73a91
)
Fix compaction bug in Class_getDeclaredMethodsUnchecked
author
Mathieu Chartier
<mathieuc@google.com>
Thu, 11 Jun 2015 23:21:42 +0000
(16:21 -0700)
committer
Mathieu Chartier
<mathieuc@google.com>
Fri, 12 Jun 2015 00:12:32 +0000
(17:12 -0700)
Added handle to fix the bug.
(cherry picked from commit
b89a8c66e360575d2dc1ec1229235735c56968ff
)
Bug:
21638351
Change-Id: I1c3abea33aa825d3a28c1fc5cb415508686ad93e
runtime/native/java_lang_Class.cc
patch
|
blob
|
history
diff --git
a/runtime/native/java_lang_Class.cc
b/runtime/native/java_lang_Class.cc
index
94024ef
..
67dcc9c
100644
(file)
--- 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();