Home | History | Annotate | Download | only in jdwp

Lines Matching full:entry

91   ObjectRegistryEntry* entry = nullptr;
92 if (ContainsLocked(soa.Self(), obj_h.Get(), identity_hash_code, &entry)) {
94 ++entry->reference_count;
96 entry = new ObjectRegistryEntry;
97 entry->jni_reference_type = JNIWeakGlobalRefType;
98 entry->jni_reference = nullptr;
99 entry->reference_count = 0;
100 entry->id = 0;
101 entry->identity_hash_code = identity_hash_code;
102 object_to_entry_.insert(std::make_pair(identity_hash_code, entry));
109 entry->jni_reference_type = JNIWeakGlobalRefType;
110 entry->jni_reference = env->NewWeakGlobalRef(local_reference);
111 entry->reference_count = 1;
112 entry->id = next_id_++;
114 id_to_entry_.Put(entry->id, entry);
118 return entry->id;
126 ObjectRegistryEntry* entry = it->second;
127 if (o == self->DecodeJObject(entry->jni_reference)) {
129 *out_entry = entry;
157 const ObjectRegistryEntry* entry = pair.second;
158 if (entry->jni_reference_type == JNIWeakGlobalRefType) {
159 env->DeleteWeakGlobalRef(entry->jni_reference);
161 env->DeleteGlobalRef(entry->jni_reference);
163 delete entry;
178 ObjectRegistryEntry& entry = *it->second;
180 return self->DecodeJObject(entry.jni_reference);
191 ObjectRegistryEntry& entry = *it->second;
192 return entry.jni_reference;
211 void ObjectRegistry::Demote(ObjectRegistryEntry& entry) {
212 if (entry.jni_reference_type == JNIGlobalRefType) {
215 jobject global = entry.jni_reference;
216 entry.jni_reference = env->NewWeakGlobalRef(entry.jni_reference);
217 entry.jni_reference_type = JNIWeakGlobalRefType;
222 void ObjectRegistry::Promote(ObjectRegistryEntry& entry) {
223 if (entry.jni_reference_type == JNIWeakGlobalRefType) {
226 jobject weak = entry.jni_reference;
227 entry.jni_reference = env->NewGlobalRef(entry.jni_reference);
228 entry.jni_reference_type = JNIGlobalRefType;
238 ObjectRegistryEntry& entry = *it->second;
239 if (entry.jni_reference_type == JNIWeakGlobalRefType) {
241 return env->IsSameObject(entry.jni_reference, nullptr); // Has the jweak been collected?
254 ObjectRegistryEntry* entry = it->second;
255 entry->reference_count -= reference_count;
256 if (entry->reference_count <= 0) {
260 int32_t hash_code = entry->identity_hash_code;
263 if (entry == inner_it->second) {
268 if (entry->jni_reference_type == JNIWeakGlobalRefType) {
269 env->DeleteWeakGlobalRef(entry->jni_reference);
271 env->DeleteGlobalRef(entry->jni_reference);
274 delete entry;