This commit is contained in:
Jesper Wilhelmsson 2019-01-15 22:54:09 +01:00
commit a8c5f1e59a
64 changed files with 1781 additions and 378 deletions

View file

@ -860,8 +860,15 @@ InstanceKlass* SystemDictionary::resolve_instance_class_or_null(Symbol* name,
check_constraints(d_hash, k, class_loader, false, THREAD);
// Need to check for a PENDING_EXCEPTION again; check_constraints
// can throw and doesn't use the CHECK macro.
// can throw but we may have to remove entry from the placeholder table below.
if (!HAS_PENDING_EXCEPTION) {
// Record dependency for non-parent delegation.
// This recording keeps the defining class loader of the klass (k) found
// from being unloaded while the initiating class loader is loaded
// even if the reference to the defining class loader is dropped
// before references to the initiating class loader.
loader_data->record_dependency(k);
{ // Grabbing the Compile_lock prevents systemDictionary updates
// during compilations.
MutexLocker mu(Compile_lock, THREAD);
@ -2179,6 +2186,7 @@ void SystemDictionary::update_dictionary(unsigned int d_hash,
InstanceKlass* sd_check = find_class(d_hash, name, dictionary);
if (sd_check == NULL) {
dictionary->add_klass(d_hash, name, k);
notice_modification();
}
#ifdef ASSERT