summaryrefslogtreecommitdiff
path: root/runtime/jni/jni_env_ext.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/jni/jni_env_ext.h')
-rw-r--r--runtime/jni/jni_env_ext.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/runtime/jni/jni_env_ext.h b/runtime/jni/jni_env_ext.h
index 3614213b60..1f57658c87 100644
--- a/runtime/jni/jni_env_ext.h
+++ b/runtime/jni/jni_env_ext.h
@@ -21,7 +21,7 @@
#include "base/locks.h"
#include "base/macros.h"
-#include "indirect_reference_table.h"
+#include "local_reference_table.h"
#include "obj_ptr.h"
#include "reference_table.h"
@@ -79,13 +79,13 @@ class JNIEnvExt : public JNIEnv {
return locals_.Capacity();
}
- IRTSegmentState GetLocalRefCookie() const { return local_ref_cookie_; }
- void SetLocalRefCookie(IRTSegmentState new_cookie) { local_ref_cookie_ = new_cookie; }
+ jni::LRTSegmentState GetLocalRefCookie() const { return local_ref_cookie_; }
+ void SetLocalRefCookie(jni::LRTSegmentState new_cookie) { local_ref_cookie_ = new_cookie; }
- IRTSegmentState GetLocalsSegmentState() const REQUIRES_SHARED(Locks::mutator_lock_) {
+ jni::LRTSegmentState GetLocalsSegmentState() const REQUIRES_SHARED(Locks::mutator_lock_) {
return locals_.GetSegmentState();
}
- void SetLocalSegmentState(IRTSegmentState new_state) REQUIRES_SHARED(Locks::mutator_lock_) {
+ void SetLocalSegmentState(jni::LRTSegmentState new_state) REQUIRES_SHARED(Locks::mutator_lock_) {
locals_.SetSegmentState(new_state);
}
@@ -169,15 +169,15 @@ class JNIEnvExt : public JNIEnv {
JavaVMExt* const vm_;
// Cookie used when using the local indirect reference table.
- IRTSegmentState local_ref_cookie_;
+ jni::LRTSegmentState local_ref_cookie_;
// JNI local references.
- IndirectReferenceTable locals_;
+ jni::LocalReferenceTable locals_;
// Stack of cookies corresponding to PushLocalFrame/PopLocalFrame calls.
// TODO: to avoid leaks (and bugs), we need to clear this vector on entry (or return)
// to a native method.
- std::vector<IRTSegmentState> stacked_local_ref_cookies_;
+ std::vector<jni::LRTSegmentState> stacked_local_ref_cookies_;
// Entered JNI monitors, for bulk exit on thread detach.
ReferenceTable monitors_;
@@ -208,6 +208,7 @@ class JNIEnvExt : public JNIEnv {
friend class Thread;
friend IndirectReferenceTable* GetIndirectReferenceTable(ScopedObjectAccess& soa,
IndirectRefKind kind);
+ friend jni::LocalReferenceTable* GetLocalReferenceTable(ScopedObjectAccess& soa);
friend void ThreadResetFunctionTable(Thread* thread, void* arg);
ART_FRIEND_TEST(JniInternalTest, JNIEnvExtOffsets);
};
@@ -229,7 +230,7 @@ class ScopedJniEnvLocalRefState {
private:
JNIEnvExt* const env_;
- const IRTSegmentState saved_local_ref_cookie_;
+ const jni::LRTSegmentState saved_local_ref_cookie_;
DISALLOW_COPY_AND_ASSIGN(ScopedJniEnvLocalRefState);
};