< prev index next >

src/share/vm/classfile/systemDictionary.cpp

Print this page

        

*** 473,487 **** MutexLocker mu(SystemDictionary_lock, THREAD); { // Note that we have an entry, and entries can be deleted only during GC, // so we cannot allow GC to occur while we're holding this entry. ! // We're using a No_Safepoint_Verifier to catch any place where we // might potentially do a GC at all. // Dictionary::do_unloading() asserts that classes in SD are only // unloaded at a safepoint. Anonymous classes are not in SD. ! No_Safepoint_Verifier nosafepoint; dictionary()->add_protection_domain(d_index, d_hash, klass, loader_data, protection_domain, THREAD); } } } --- 473,487 ---- MutexLocker mu(SystemDictionary_lock, THREAD); { // Note that we have an entry, and entries can be deleted only during GC, // so we cannot allow GC to occur while we're holding this entry. ! // We're using a NoSafepointVerifier to catch any place where we // might potentially do a GC at all. // Dictionary::do_unloading() asserts that classes in SD are only // unloaded at a safepoint. Anonymous classes are not in SD. ! NoSafepointVerifier nosafepoint; dictionary()->add_protection_domain(d_index, d_hash, klass, loader_data, protection_domain, THREAD); } } }
*** 906,920 **** // Check the protection domain has the right access { MutexLocker mu(SystemDictionary_lock, THREAD); // Note that we have an entry, and entries can be deleted only during GC, // so we cannot allow GC to occur while we're holding this entry. ! // We're using a No_Safepoint_Verifier to catch any place where we // might potentially do a GC at all. // Dictionary::do_unloading() asserts that classes in SD are only // unloaded at a safepoint. Anonymous classes are not in SD. ! No_Safepoint_Verifier nosafepoint; if (dictionary()->is_valid_protection_domain(d_index, d_hash, name, loader_data, protection_domain)) { return k(); } --- 906,920 ---- // Check the protection domain has the right access { MutexLocker mu(SystemDictionary_lock, THREAD); // Note that we have an entry, and entries can be deleted only during GC, // so we cannot allow GC to occur while we're holding this entry. ! // We're using a NoSafepointVerifier to catch any place where we // might potentially do a GC at all. // Dictionary::do_unloading() asserts that classes in SD are only // unloaded at a safepoint. Anonymous classes are not in SD. ! NoSafepointVerifier nosafepoint; if (dictionary()->is_valid_protection_domain(d_index, d_hash, name, loader_data, protection_domain)) { return k(); }
*** 959,973 **** int d_index = dictionary()->hash_to_index(d_hash); { // Note that we have an entry, and entries can be deleted only during GC, // so we cannot allow GC to occur while we're holding this entry. ! // We're using a No_Safepoint_Verifier to catch any place where we // might potentially do a GC at all. // Dictionary::do_unloading() asserts that classes in SD are only // unloaded at a safepoint. Anonymous classes are not in SD. ! No_Safepoint_Verifier nosafepoint; return dictionary()->find(d_index, d_hash, class_name, loader_data, protection_domain, THREAD); } } --- 959,973 ---- int d_index = dictionary()->hash_to_index(d_hash); { // Note that we have an entry, and entries can be deleted only during GC, // so we cannot allow GC to occur while we're holding this entry. ! // We're using a NoSafepointVerifier to catch any place where we // might potentially do a GC at all. // Dictionary::do_unloading() asserts that classes in SD are only // unloaded at a safepoint. Anonymous classes are not in SD. ! NoSafepointVerifier nosafepoint; return dictionary()->find(d_index, d_hash, class_name, loader_data, protection_domain, THREAD); } }
*** 2208,2218 **** int d_index2 = dictionary()->hash_to_index(d_hash2); { MutexLocker mu_s(SystemDictionary_lock, THREAD); // Better never do a GC while we're holding these oops ! No_Safepoint_Verifier nosafepoint; Klass* klass1 = find_class(d_index1, d_hash1, constraint_name, loader_data1); Klass* klass2 = find_class(d_index2, d_hash2, constraint_name, loader_data2); return constraints()->add_entry(constraint_name, klass1, class_loader1, klass2, class_loader2); --- 2208,2218 ---- int d_index2 = dictionary()->hash_to_index(d_hash2); { MutexLocker mu_s(SystemDictionary_lock, THREAD); // Better never do a GC while we're holding these oops ! NoSafepointVerifier nosafepoint; Klass* klass1 = find_class(d_index1, d_hash1, constraint_name, loader_data1); Klass* klass2 = find_class(d_index2, d_hash2, constraint_name, loader_data2); return constraints()->add_entry(constraint_name, klass1, class_loader1, klass2, class_loader2);
< prev index next >