diff options
author | 2016-07-26 19:54:28 +0000 | |
---|---|---|
committer | 2016-07-26 19:54:28 +0000 | |
commit | 93afc5f20a23ece78d6d6e506ed75775b8ef2113 (patch) | |
tree | 03b668bd44f89da024531145043c04f670363528 /runtime/art_method-inl.h | |
parent | e92730cbc5e05b8057cf103af876927c9c361b73 (diff) | |
parent | 10b218d32c0006aab747a53a9867d982cde9c938 (diff) |
Merge "Add missing filter cards to zygote mod union table"
Diffstat (limited to 'runtime/art_method-inl.h')
-rw-r--r-- | runtime/art_method-inl.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/runtime/art_method-inl.h b/runtime/art_method-inl.h index 32425d89a0..70a907f11d 100644 --- a/runtime/art_method-inl.h +++ b/runtime/art_method-inl.h @@ -90,10 +90,12 @@ inline uint32_t ArtMethod::GetAccessFlags() { if (kIsDebugBuild) { Thread* self = Thread::Current(); if (!Locks::mutator_lock_->IsSharedHeld(self)) { - ScopedObjectAccess soa(self); - CHECK(IsRuntimeMethod() || - GetDeclaringClass<kReadBarrierOption>()->IsIdxLoaded() || - GetDeclaringClass<kReadBarrierOption>()->IsErroneous()); + if (self->IsThreadSuspensionAllowable()) { + ScopedObjectAccess soa(self); + CHECK(IsRuntimeMethod() || + GetDeclaringClass<kReadBarrierOption>()->IsIdxLoaded() || + GetDeclaringClass<kReadBarrierOption>()->IsErroneous()); + } } else { // We cannot use SOA in this case. We might be holding the lock, but may not be in the // runnable state (e.g., during GC). |