144 // Tells whether a protection is in the approved set. 145 bool contains_protection_domain(oop protection_domain) const; 146 // Adds a protection domain to the approved set. 147 void add_protection_domain(Dictionary* dict, Handle protection_domain); 148 149 InstanceKlass* instance_klass() const { return literal(); } 150 InstanceKlass** klass_addr() { return (InstanceKlass**)literal_addr(); } 151 152 DictionaryEntry* next() const { 153 return (DictionaryEntry*)HashtableEntry<InstanceKlass*, mtClass>::next(); 154 } 155 156 DictionaryEntry** next_addr() { 157 return (DictionaryEntry**)HashtableEntry<InstanceKlass*, mtClass>::next_addr(); 158 } 159 160 ProtectionDomainEntry* pd_set() const { return _pd_set; } 161 void set_pd_set(ProtectionDomainEntry* new_head) { _pd_set = new_head; } 162 163 ProtectionDomainEntry* pd_set_acquire() const { 164 return (ProtectionDomainEntry*)OrderAccess::load_ptr_acquire(&_pd_set); 165 } 166 void release_set_pd_set(ProtectionDomainEntry* new_head) { 167 OrderAccess::release_store_ptr(&_pd_set, new_head); 168 } 169 170 // Tells whether the initiating class' protection domain can access the klass in this entry 171 bool is_valid_protection_domain(Handle protection_domain) { 172 if (!ProtectionDomainVerification) return true; 173 if (!SystemDictionary::has_checkPackageAccess()) return true; 174 175 return protection_domain() == NULL 176 ? true 177 : contains_protection_domain(protection_domain()); 178 } 179 180 void verify_protection_domain_set() { 181 for (ProtectionDomainEntry* current = pd_set(); // accessed at a safepoint 182 current != NULL; 183 current = current->_next) { 184 current->_pd_cache->protection_domain()->verify(); 185 } 186 } 187 | 144 // Tells whether a protection is in the approved set. 145 bool contains_protection_domain(oop protection_domain) const; 146 // Adds a protection domain to the approved set. 147 void add_protection_domain(Dictionary* dict, Handle protection_domain); 148 149 InstanceKlass* instance_klass() const { return literal(); } 150 InstanceKlass** klass_addr() { return (InstanceKlass**)literal_addr(); } 151 152 DictionaryEntry* next() const { 153 return (DictionaryEntry*)HashtableEntry<InstanceKlass*, mtClass>::next(); 154 } 155 156 DictionaryEntry** next_addr() { 157 return (DictionaryEntry**)HashtableEntry<InstanceKlass*, mtClass>::next_addr(); 158 } 159 160 ProtectionDomainEntry* pd_set() const { return _pd_set; } 161 void set_pd_set(ProtectionDomainEntry* new_head) { _pd_set = new_head; } 162 163 ProtectionDomainEntry* pd_set_acquire() const { 164 return OrderAccess::load_acquire(&_pd_set); 165 } 166 void release_set_pd_set(ProtectionDomainEntry* new_head) { 167 OrderAccess::release_store(&_pd_set, new_head); 168 } 169 170 // Tells whether the initiating class' protection domain can access the klass in this entry 171 bool is_valid_protection_domain(Handle protection_domain) { 172 if (!ProtectionDomainVerification) return true; 173 if (!SystemDictionary::has_checkPackageAccess()) return true; 174 175 return protection_domain() == NULL 176 ? true 177 : contains_protection_domain(protection_domain()); 178 } 179 180 void verify_protection_domain_set() { 181 for (ProtectionDomainEntry* current = pd_set(); // accessed at a safepoint 182 current != NULL; 183 current = current->_next) { 184 current->_pd_cache->protection_domain()->verify(); 185 } 186 } 187 |