equal
deleted
inserted
replaced
159 return (desired_size != 0); |
159 return (desired_size != 0); |
160 } |
160 } |
161 |
161 |
162 bool DictionaryEntry::contains_protection_domain(oop protection_domain) const { |
162 bool DictionaryEntry::contains_protection_domain(oop protection_domain) const { |
163 #ifdef ASSERT |
163 #ifdef ASSERT |
164 if (protection_domain == instance_klass()->protection_domain()) { |
164 if (oopDesc::equals(protection_domain, instance_klass()->protection_domain())) { |
165 // Ensure this doesn't show up in the pd_set (invariant) |
165 // Ensure this doesn't show up in the pd_set (invariant) |
166 bool in_pd_set = false; |
166 bool in_pd_set = false; |
167 for (ProtectionDomainEntry* current = pd_set_acquire(); |
167 for (ProtectionDomainEntry* current = pd_set_acquire(); |
168 current != NULL; |
168 current != NULL; |
169 current = current->next()) { |
169 current = current->next()) { |
170 if (current->object_no_keepalive() == protection_domain) { |
170 if (oopDesc::equals(current->object_no_keepalive(), protection_domain)) { |
171 in_pd_set = true; |
171 in_pd_set = true; |
172 break; |
172 break; |
173 } |
173 } |
174 } |
174 } |
175 if (in_pd_set) { |
175 if (in_pd_set) { |
177 "in its sys. dict. PD set"); |
177 "in its sys. dict. PD set"); |
178 } |
178 } |
179 } |
179 } |
180 #endif /* ASSERT */ |
180 #endif /* ASSERT */ |
181 |
181 |
182 if (protection_domain == instance_klass()->protection_domain()) { |
182 if (oopDesc::equals(protection_domain, instance_klass()->protection_domain())) { |
183 // Succeeds trivially |
183 // Succeeds trivially |
184 return true; |
184 return true; |
185 } |
185 } |
186 |
186 |
187 for (ProtectionDomainEntry* current = pd_set_acquire(); |
187 for (ProtectionDomainEntry* current = pd_set_acquire(); |
188 current != NULL; |
188 current != NULL; |
189 current = current->next()) { |
189 current = current->next()) { |
190 if (current->object_no_keepalive() == protection_domain) return true; |
190 if (oopDesc::equals(current->object_no_keepalive(), protection_domain)) return true; |
191 } |
191 } |
192 return false; |
192 return false; |
193 } |
193 } |
194 |
194 |
195 |
195 |