Explicitly pass Thread::Current to MutexLock and Alloc.
Change-Id: I8b75bc0617915465f102815b32306aa7760dcae4
diff --git a/src/reflection.cc b/src/reflection.cc
index 7d73ae2..c793d2c 100644
--- a/src/reflection.cc
+++ b/src/reflection.cc
@@ -234,11 +234,10 @@
LOG(FATAL) << static_cast<int>(src_class);
}
- if (kIsDebugBuild) {
- MutexLock mu(*Locks::thread_suspend_count_lock_);
- CHECK_EQ(Thread::Current()->GetState(), kRunnable);
- }
ScopedObjectAccessUnchecked soa(Thread::Current());
+ if (kIsDebugBuild) {
+ CHECK_EQ(soa.Self()->GetState(), kRunnable);
+ }
JValue args[1] = { value };
soa.DecodeMethod(m)->Invoke(soa.Self(), NULL, args, &value);
}