summaryrefslogtreecommitdiffstats
path: root/runtime/runtime-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/runtime-inl.h')
-rw-r--r--runtime/runtime-inl.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/runtime-inl.h b/runtime/runtime-inl.h
index ac9026b..8b632b2 100644
--- a/runtime/runtime-inl.h
+++ b/runtime/runtime-inl.h
@@ -23,6 +23,18 @@
namespace art {
+inline bool Runtime::IsClearedJniWeakGlobal(mirror::Object* obj) {
+ return obj == GetClearedJniWeakGlobal();
+}
+
+inline mirror::Object* Runtime::GetClearedJniWeakGlobal() {
+ mirror::Object* obj = sentinel_.Read();
+ if (obj == nullptr) {
+ LOG(ERROR) << "Failed to return cleared JNI weak global sentinel";
+ }
+ return obj;
+}
+
inline QuickMethodFrameInfo Runtime::GetRuntimeMethodFrameInfo(mirror::ArtMethod* method) {
DCHECK(method != nullptr);
// Cannot be imt-conflict-method or resolution-method.