• Home
  • Raw
  • Download

Lines Matching refs:entry

58   ObjectRegistryEntry& entry = result.first->second;  in InternalAdd()  local
61 entry.reference_count += 1; in InternalAdd()
62 return entry.id; in InternalAdd()
70 entry.jni_reference_type = JNIWeakGlobalRefType; in InternalAdd()
71 entry.jni_reference = env->NewWeakGlobalRef(local_reference); in InternalAdd()
72 entry.reference_count = 1; in InternalAdd()
73 entry.id = next_id_++; in InternalAdd()
75 id_to_entry_.Put(entry.id, &entry); in InternalAdd()
79 return entry.id; in InternalAdd()
96 ObjectRegistryEntry& entry = (it->second); in Clear() local
97 if (entry.jni_reference_type == JNIWeakGlobalRefType) { in Clear()
98 env->DeleteWeakGlobalRef(entry.jni_reference); in Clear()
100 env->DeleteGlobalRef(entry.jni_reference); in Clear()
116 ObjectRegistryEntry& entry = *(it->second); in InternalGet() local
117 return self->DecodeJObject(entry.jni_reference); in InternalGet()
125 ObjectRegistryEntry& entry = *(it->second); in GetJObject() local
126 return entry.jni_reference; in GetJObject()
149 void ObjectRegistry::Demote(ObjectRegistryEntry& entry) { in Demote() argument
150 if (entry.jni_reference_type == JNIGlobalRefType) { in Demote()
153 jobject global = entry.jni_reference; in Demote()
154 entry.jni_reference = env->NewWeakGlobalRef(entry.jni_reference); in Demote()
155 entry.jni_reference_type = JNIWeakGlobalRefType; in Demote()
160 void ObjectRegistry::Promote(ObjectRegistryEntry& entry) { in Promote() argument
161 if (entry.jni_reference_type == JNIWeakGlobalRefType) { in Promote()
164 jobject weak = entry.jni_reference; in Promote()
165 entry.jni_reference = env->NewGlobalRef(entry.jni_reference); in Promote()
166 entry.jni_reference_type = JNIGlobalRefType; in Promote()
179 ObjectRegistryEntry& entry = *(it->second); in IsCollected() local
180 if (entry.jni_reference_type == JNIWeakGlobalRefType) { in IsCollected()
182 return env->IsSameObject(entry.jni_reference, NULL); // Has the jweak been collected? in IsCollected()
196 ObjectRegistryEntry& entry = *(it->second); in DisposeObject() local
197 entry.reference_count -= reference_count; in DisposeObject()
198 if (entry.reference_count <= 0) { in DisposeObject()
200 mirror::Object* object = self->DecodeJObject(entry.jni_reference); in DisposeObject()
201 if (entry.jni_reference_type == JNIWeakGlobalRefType) { in DisposeObject()
202 env->DeleteWeakGlobalRef(entry.jni_reference); in DisposeObject()
204 env->DeleteGlobalRef(entry.jni_reference); in DisposeObject()