Remove using mirror::* in jni internal.
Cleans up the code since it helps make it easier to spot moving GC
related bugs.
Also fixed moving GC bugs in MonitorEnter, and FindFieldID.
Change-Id: I794e4fbcc2010875fc6b299c6d4c9fb0f071b71a
diff --git a/runtime/entrypoints/quick/quick_lock_entrypoints.cc b/runtime/entrypoints/quick/quick_lock_entrypoints.cc
index 540abb3..5bc7f4c 100644
--- a/runtime/entrypoints/quick/quick_lock_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_lock_entrypoints.cc
@@ -30,10 +30,8 @@
return -1; // Failure.
} else {
if (kIsDebugBuild) {
- // GC may move the obj, need Sirt for the following DCHECKs.
- SirtRef<mirror::Object> sirt_obj(self, obj);
- obj->MonitorEnter(self); // May block
- CHECK(self->HoldsLock(sirt_obj.get()));
+ obj = obj->MonitorEnter(self); // May block
+ CHECK(self->HoldsLock(obj));
CHECK(!self->IsExceptionPending());
} else {
obj->MonitorEnter(self); // May block