mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8258408: SystemDictionary passes TRAPS to functions that don't throw exceptions
Reviewed-by: dholmes, lfoltan
This commit is contained in:
parent
9ed0b76403
commit
6e824b3f51
8 changed files with 137 additions and 170 deletions
|
@ -1043,8 +1043,8 @@ InstanceKlass* SystemDictionaryShared::find_or_load_shared_class(
|
|||
// Note: currently, find_or_load_shared_class is called only from
|
||||
// JVM_FindLoadedClass and used for PlatformClassLoader and AppClassLoader,
|
||||
// which are parallel-capable loaders, so this lock is NOT taken.
|
||||
Handle lockObject = compute_loader_lock_object(class_loader, THREAD);
|
||||
check_loader_lock_contention(lockObject, THREAD);
|
||||
Handle lockObject = compute_loader_lock_object(THREAD, class_loader);
|
||||
check_loader_lock_contention(THREAD, lockObject);
|
||||
ObjectLocker ol(lockObject, THREAD, DoObjectLock);
|
||||
|
||||
{
|
||||
|
@ -1216,7 +1216,7 @@ bool SystemDictionaryShared::add_unregistered_class(InstanceKlass* k, TRAPS) {
|
|||
_loaded_unregistered_classes->put_if_absent(name, true, &created);
|
||||
if (created) {
|
||||
MutexLocker mu_r(THREAD, Compile_lock); // add_to_hierarchy asserts this.
|
||||
SystemDictionary::add_to_hierarchy(k, CHECK_false);
|
||||
SystemDictionary::add_to_hierarchy(k);
|
||||
}
|
||||
return created;
|
||||
}
|
||||
|
@ -1719,9 +1719,8 @@ InstanceKlass* SystemDictionaryShared::prepare_shared_lambda_proxy_class(Instanc
|
|||
{
|
||||
MutexLocker mu_r(THREAD, Compile_lock);
|
||||
|
||||
// Add to class hierarchy, initialize vtables, and do possible
|
||||
// deoptimizations.
|
||||
SystemDictionary::add_to_hierarchy(loaded_lambda, CHECK_NULL); // No exception, but can block
|
||||
// Add to class hierarchy, and do possible deoptimizations.
|
||||
SystemDictionary::add_to_hierarchy(loaded_lambda);
|
||||
// But, do not add to dictionary.
|
||||
}
|
||||
loaded_lambda->link_class(CHECK_NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue