Make CheckJNI and JNI workarounds mutually exclusive...
...in the opposite direction; needing workarounds turns off CheckJNI.
This isn't necessarily a good idea, but I like the cleanup parts of
this change.
Change-Id: I708235ea3e5cc35ef90b01dd810e097e3ff9dd26
diff --git a/src/heap.cc b/src/heap.cc
index 189bb91..13603d9 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -294,7 +294,10 @@
bool Heap::IsHeapAddress(const Object* obj) {
// Note: we deliberately don't take the lock here, and mustn't test anything that would
// require taking the lock.
- if (obj == NULL || !IsAligned<kObjectAlignment>(obj)) {
+ if (obj == NULL) {
+ return true;
+ }
+ if (!IsAligned<kObjectAlignment>(obj)) {
return false;
}
for (size_t i = 0; i < spaces_.size(); ++i) {