diff options
-rw-r--r-- | runtime/scoped_thread_state_change.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/runtime/scoped_thread_state_change.h b/runtime/scoped_thread_state_change.h index b93fcb4322..99750a16d0 100644 --- a/runtime/scoped_thread_state_change.h +++ b/runtime/scoped_thread_state_change.h @@ -133,11 +133,7 @@ class ScopedObjectAccessAlreadyRunnable { T AddLocalReference(mirror::Object* obj) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { Locks::mutator_lock_->AssertSharedHeld(Self()); DCHECK(IsRunnable()); // Don't work with raw objects in non-runnable states. - if (obj == nullptr) { - return nullptr; - } - DCHECK_NE((reinterpret_cast<uintptr_t>(obj) & 0xffff0000), 0xebad0000); - return Env()->AddLocalReference<T>(obj); + return obj == nullptr ? nullptr : Env()->AddLocalReference<T>(obj); } template<typename T> |