OSDN Git Service

Delete invalid DCHECK
authorMathieu Chartier <mathieuc@google.com>
Mon, 4 May 2015 18:46:25 +0000 (11:46 -0700)
committerMathieu Chartier <mathieuc@google.com>
Mon, 4 May 2015 19:05:09 +0000 (12:05 -0700)
We can have large objects mapped at address 0xebad____.

Change-Id: I9e27d4948e7e853b4af6eb1b36dbfec6d4d7a99a

runtime/scoped_thread_state_change.h

index b93fcb4..99750a1 100644 (file)
@@ -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>