814 k->class_loader() != class_loader()) { |
814 k->class_loader() != class_loader()) { |
815 |
815 |
816 check_constraints(d_index, d_hash, k, class_loader, false, THREAD); |
816 check_constraints(d_index, d_hash, k, class_loader, false, THREAD); |
817 |
817 |
818 // Need to check for a PENDING_EXCEPTION again; check_constraints |
818 // Need to check for a PENDING_EXCEPTION again; check_constraints |
819 // can throw and doesn't use the CHECK macro. |
819 // can throw but we may have to remove entry from the placeholder table below. |
|
820 if (!HAS_PENDING_EXCEPTION) { |
|
821 // Record dependency for non-parent delegation. |
|
822 // This recording keeps the defining class loader of the klass (k) found |
|
823 // from being unloaded while the initiating class loader is loaded |
|
824 // even if the reference to the defining class loader is dropped |
|
825 // before references to the initiating class loader. |
|
826 loader_data->record_dependency(k(), THREAD); |
|
827 } |
|
828 |
820 if (!HAS_PENDING_EXCEPTION) { |
829 if (!HAS_PENDING_EXCEPTION) { |
821 { // Grabbing the Compile_lock prevents systemDictionary updates |
830 { // Grabbing the Compile_lock prevents systemDictionary updates |
822 // during compilations. |
831 // during compilations. |
823 MutexLocker mu(Compile_lock, THREAD); |
832 MutexLocker mu(Compile_lock, THREAD); |
824 update_dictionary(d_index, d_hash, p_index, p_hash, |
833 update_dictionary(d_index, d_hash, p_index, p_hash, |