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:
03f9e6b
)
Query declaring class before querying IsNative.
author
Nicolas Geoffray
<ngeoffray@google.com>
Fri, 4 Mar 2016 16:43:27 +0000
(16:43 +0000)
committer
Nicolas Geoffray
<ngeoffray@google.com>
Fri, 4 Mar 2016 16:43:27 +0000
(16:43 +0000)
IsNative checks that the declaring class is not null.
Change-Id: I9b775858cdb685eb633b3d8a8a271a3d451bb8a9
runtime/mirror/class-inl.h
patch
|
blob
|
history
diff --git
a/runtime/mirror/class-inl.h
b/runtime/mirror/class-inl.h
index
cbcb4b9
..
103a8b7
100644
(file)
--- a/
runtime/mirror/class-inl.h
+++ b/
runtime/mirror/class-inl.h
@@
-940,7
+940,7
@@
void mirror::Class::VisitNativeRoots(Visitor& visitor, size_t pointer_size) {
}
for (ArtMethod& method : GetMethods(pointer_size)) {
method.VisitRoots(visitor, pointer_size);
- if (!method.IsNative()) {
+ if (
method.GetDeclaringClassUnchecked() != nullptr &&
!method.IsNative()) {
ProfilingInfo* profiling_info = method.GetProfilingInfo(pointer_size);
if (profiling_info != nullptr) {
profiling_info->VisitRoots(visitor);