diff options
| author | 2016-03-04 16:43:27 +0000 | |
|---|---|---|
| committer | 2016-03-04 16:43:27 +0000 | |
| commit | 26329cd578efe9cd7e60c46fef1bfb549062a283 (patch) | |
| tree | c64d3f457588c917bc86e57fdc3682ca57ab2693 | |
| parent | 03f9e6bbdaf3cd6367176afe373ec6aab27b7c46 (diff) | |
Query declaring class before querying IsNative.
IsNative checks that the declaring class is not null.
Change-Id: I9b775858cdb685eb633b3d8a8a271a3d451bb8a9
| -rw-r--r-- | runtime/mirror/class-inl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/mirror/class-inl.h b/runtime/mirror/class-inl.h index cbcb4b964b..103a8b79ef 100644 --- 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); |