mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 10:04:42 +02:00
8267954: Shared classes that failed to load should not be loaded again
Reviewed-by: iklam, ccheung
This commit is contained in:
parent
991ca14279
commit
7ff6e7b2b1
7 changed files with 51 additions and 36 deletions
|
@ -1018,6 +1018,7 @@ InstanceKlass* SystemDictionaryShared::find_or_load_shared_class(
|
|||
|
||||
k = load_shared_class_for_builtin_loader(name, class_loader, THREAD);
|
||||
if (k != NULL) {
|
||||
SharedClassLoadingMark slm(THREAD, k);
|
||||
k = find_or_define_instance_class(name, class_loader, k, CHECK_NULL);
|
||||
}
|
||||
}
|
||||
|
@ -1047,11 +1048,10 @@ InstanceKlass* SystemDictionaryShared::load_shared_class_for_builtin_loader(
|
|||
assert(UseSharedSpaces, "must be");
|
||||
InstanceKlass* ik = find_builtin_class(class_name);
|
||||
|
||||
if (ik != NULL) {
|
||||
if ((ik->is_shared_app_class() &&
|
||||
SystemDictionary::is_system_class_loader(class_loader())) ||
|
||||
(ik->is_shared_platform_class() &&
|
||||
SystemDictionary::is_platform_class_loader(class_loader()))) {
|
||||
if (ik != NULL && !ik->shared_loading_failed()) {
|
||||
if ((SystemDictionary::is_system_class_loader(class_loader()) && ik->is_shared_app_class()) ||
|
||||
(SystemDictionary::is_platform_class_loader(class_loader()) && ik->is_shared_platform_class())) {
|
||||
SharedClassLoadingMark slm(THREAD, ik);
|
||||
PackageEntry* pkg_entry = get_package_entry_from_class(ik, class_loader);
|
||||
Handle protection_domain =
|
||||
SystemDictionaryShared::init_security_info(class_loader, ik, pkg_entry, CHECK_NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue