Rename GlobalSynchronization to Locks
Also address some review comments in common_throws relating to
ToStr<InvokeType> and exception detail messages.
Change-Id: Ibf2c0f147689fa236d349bd7f01eed3c2522552b
diff --git a/src/reflection.cc b/src/reflection.cc
index 542f1a2..7f1d4d1 100644
--- a/src/reflection.cc
+++ b/src/reflection.cc
@@ -235,7 +235,7 @@
}
if (kIsDebugBuild) {
- MutexLock mu(*GlobalSynchronization::thread_suspend_count_lock_);
+ MutexLock mu(*Locks::thread_suspend_count_lock_);
CHECK_EQ(Thread::Current()->GetState(), kRunnable);
}
ScopedObjectAccessUnchecked soa(Thread::Current());
@@ -244,7 +244,7 @@
}
static std::string UnboxingFailureKind(Method* m, int index, Field* f)
- SHARED_LOCKS_REQUIRED(GlobalSynchronization::mutator_lock_) {
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
if (m != NULL && index != -1) {
++index; // Humans count from 1.
return StringPrintf("method %s argument %d", PrettyMethod(m, false).c_str(), index);
@@ -257,7 +257,7 @@
static bool UnboxPrimitive(Object* o, Class* dst_class, JValue& unboxed_value, Method* m,
int index, Field* f)
- SHARED_LOCKS_REQUIRED(GlobalSynchronization::mutator_lock_) {
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
if (!dst_class->IsPrimitive()) {
if (o != NULL && !o->InstanceOf(dst_class)) {
Thread::Current()->ThrowNewExceptionF("Ljava/lang/IllegalArgumentException;",