diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-02-14 16:59:41 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-02-14 18:26:37 -0800 |
commit | e7e8a5fea2d852cccc840fa046151a16627f26cd (patch) | |
tree | 4509736090c371a363e79f4a3d01107d0b8d5e72 /runtime/entrypoints/quick | |
parent | cc35e45f371f5018b42e2ef383185e2840cf4374 (diff) | |
download | art-e7e8a5fea2d852cccc840fa046151a16627f26cd.zip art-e7e8a5fea2d852cccc840fa046151a16627f26cd.tar.gz art-e7e8a5fea2d852cccc840fa046151a16627f26cd.tar.bz2 |
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
Diffstat (limited to 'runtime/entrypoints/quick')
-rw-r--r-- | runtime/entrypoints/quick/quick_lock_entrypoints.cc | 6 |
1 files changed, 2 insertions, 4 deletions
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 @@ extern "C" int artLockObjectFromCode(mirror::Object* obj, Thread* self, mirror:: 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 |