< prev index next >

src/share/vm/classfile/dictionary.cpp

Print this page

        

*** 99,109 **** bool DictionaryEntry::contains_protection_domain(oop protection_domain) const { #ifdef ASSERT if (protection_domain == instance_klass()->protection_domain()) { // Ensure this doesn't show up in the pd_set (invariant) bool in_pd_set = false; ! for (ProtectionDomainEntry* current = _pd_set; current != NULL; current = current->next()) { if (current->protection_domain() == protection_domain) { in_pd_set = true; break; --- 99,109 ---- bool DictionaryEntry::contains_protection_domain(oop protection_domain) const { #ifdef ASSERT if (protection_domain == instance_klass()->protection_domain()) { // Ensure this doesn't show up in the pd_set (invariant) bool in_pd_set = false; ! for (ProtectionDomainEntry* current = pd_set(); current != NULL; current = current->next()) { if (current->protection_domain() == protection_domain) { in_pd_set = true; break;
*** 119,129 **** if (protection_domain == instance_klass()->protection_domain()) { // Succeeds trivially return true; } ! for (ProtectionDomainEntry* current = _pd_set; current != NULL; current = current->next()) { if (current->protection_domain() == protection_domain) return true; } return false; --- 119,129 ---- if (protection_domain == instance_klass()->protection_domain()) { // Succeeds trivially return true; } ! for (ProtectionDomainEntry* current = pd_set(); current != NULL; current = current->next()) { if (current->protection_domain() == protection_domain) return true; } return false;
*** 133,148 **** void DictionaryEntry::add_protection_domain(Dictionary* dict, Handle protection_domain) { assert_locked_or_safepoint(SystemDictionary_lock); if (!contains_protection_domain(protection_domain())) { ProtectionDomainCacheEntry* entry = SystemDictionary::cache_get(protection_domain); ProtectionDomainEntry* new_head = ! new ProtectionDomainEntry(entry, _pd_set); ! // Warning: Preserve store ordering. The SystemDictionary is read ! // without locks. The new ProtectionDomainEntry must be ! // complete before other threads can be allowed to see it ! // via a store to _pd_set. ! OrderAccess::release_store_ptr(&_pd_set, new_head); } LogTarget(Trace, protectiondomain) lt; if (lt.is_enabled()) { LogStream ls(lt); print_count(&ls); --- 133,144 ---- void DictionaryEntry::add_protection_domain(Dictionary* dict, Handle protection_domain) { assert_locked_or_safepoint(SystemDictionary_lock); if (!contains_protection_domain(protection_domain())) { ProtectionDomainCacheEntry* entry = SystemDictionary::cache_get(protection_domain); ProtectionDomainEntry* new_head = ! new ProtectionDomainEntry(entry, pd_set()); ! set_pd_set(new_head); } LogTarget(Trace, protectiondomain) lt; if (lt.is_enabled()) { LogStream ls(lt); print_count(&ls);
< prev index next >