Disable compaction for jni workarounds.
Compaction can't work when jni workarounds is enabled. Also some
other refactoring.
Change-Id: Ia7b0f2b39c79f5a0a5f50874d823b950ab02a0c3
diff --git a/runtime/indirect_reference_table.cc b/runtime/indirect_reference_table.cc
index 54c7b6e..82b53f6 100644
--- a/runtime/indirect_reference_table.cc
+++ b/runtime/indirect_reference_table.cc
@@ -21,6 +21,7 @@
#include "scoped_thread_state_change.h"
#include "thread.h"
#include "utils.h"
+#include "verify_object-inl.h"
#include <cstdlib>
@@ -81,8 +82,7 @@
size_t topIndex = segment_state_.parts.topIndex;
CHECK(obj != NULL);
- // TODO: stronger sanity check on the object (such as in heap)
- DCHECK_ALIGNED(reinterpret_cast<uintptr_t>(obj), 8);
+ VerifyObject(obj);
DCHECK(table_ != NULL);
DCHECK_LE(alloc_entries_, max_entries_);
DCHECK_GE(segment_state_.parts.numHoles, prevState.parts.numHoles);