diff options
-rw-r--r-- | runtime/base/mutex.h | 6 | ||||
-rw-r--r-- | runtime/dex_file.h | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/runtime/base/mutex.h b/runtime/base/mutex.h index b924798acf..21ba0d2e04 100644 --- a/runtime/base/mutex.h +++ b/runtime/base/mutex.h @@ -238,7 +238,7 @@ class LOCKABLE ReaderWriterMutex : public BaseMutex { // Assert the current thread has exclusive access to the ReaderWriterMutex. void AssertExclusiveHeld(const Thread* self) { - if (kDebugLocking & (gAborting == 0)) { + if (kDebugLocking && (gAborting == 0)) { CHECK(IsExclusiveHeld(self)) << *this; } } @@ -246,7 +246,7 @@ class LOCKABLE ReaderWriterMutex : public BaseMutex { // Assert the current thread doesn't have exclusive access to the ReaderWriterMutex. void AssertNotExclusiveHeld(const Thread* self) { - if (kDebugLocking & (gAborting == 0)) { + if (kDebugLocking && (gAborting == 0)) { CHECK(!IsExclusiveHeld(self)) << *this; } } @@ -257,7 +257,7 @@ class LOCKABLE ReaderWriterMutex : public BaseMutex { // Assert the current thread has shared access to the ReaderWriterMutex. void AssertSharedHeld(const Thread* self) { - if (kDebugLocking & (gAborting == 0)) { + if (kDebugLocking && (gAborting == 0)) { // TODO: we can only assert this well when self != NULL. CHECK(IsSharedHeld(self) || self == NULL) << *this; } diff --git a/runtime/dex_file.h b/runtime/dex_file.h index 76947e5cee..a60a1398d8 100644 --- a/runtime/dex_file.h +++ b/runtime/dex_file.h @@ -209,7 +209,7 @@ class DexFile { } const TypeItem& GetTypeItem(uint32_t idx) const { - CHECK_LT(idx, this->size_); + DCHECK_LT(idx, this->size_); return this->list_[idx]; } @@ -494,7 +494,7 @@ class DexFile { // Returns the FieldId at the specified index. const FieldId& GetFieldId(uint32_t idx) const { - CHECK_LT(idx, NumFieldIds()) << GetLocation(); + DCHECK_LT(idx, NumFieldIds()) << GetLocation(); return field_ids_[idx]; } @@ -585,7 +585,7 @@ class DexFile { // Returns the ClassDef at the specified index. const ClassDef& GetClassDef(uint32_t idx) const { - CHECK_LT(idx, NumClassDefs()) << GetLocation(); + DCHECK_LT(idx, NumClassDefs()) << GetLocation(); return class_defs_[idx]; } @@ -1025,7 +1025,7 @@ class ClassDataItemIterator { if (pos_ < EndOfInstanceFieldsPos()) { return last_idx_ + field_.field_idx_delta_; } else { - CHECK_LT(pos_, EndOfVirtualMethodsPos()); + DCHECK_LT(pos_, EndOfVirtualMethodsPos()); return last_idx_ + method_.method_idx_delta_; } } @@ -1033,7 +1033,7 @@ class ClassDataItemIterator { if (pos_ < EndOfInstanceFieldsPos()) { return field_.access_flags_; } else { - CHECK_LT(pos_, EndOfVirtualMethodsPos()); + DCHECK_LT(pos_, EndOfVirtualMethodsPos()); return method_.access_flags_; } } @@ -1045,7 +1045,7 @@ class ClassDataItemIterator { return kDirect; } } else { - CHECK_EQ(GetMemberAccessFlags() & kAccStatic, 0U); + DCHECK_EQ(GetMemberAccessFlags() & kAccStatic, 0U); if ((class_def.access_flags_ & kAccInterface) != 0) { return kInterface; } else if ((GetMemberAccessFlags() & kAccConstructor) != 0) { |