1187 return NULL; |
1187 return NULL; |
1188 } |
1188 } |
1189 } |
1189 } |
1190 |
1190 |
1191 |
1191 |
1192 // Load a class from the shared spaces (found through the shared system |
1192 // Load a class for boot loader from the shared spaces (found through |
1193 // dictionary). Force the superclass and all interfaces to be loaded. |
1193 // the shared system dictionary). Force the super class and all interfaces |
1194 // Update the class definition to include sibling classes and no |
1194 // to be loaded. |
1195 // subclasses (yet). [Classes in the shared space are not part of the |
1195 InstanceKlass* SystemDictionary::load_shared_boot_class(Symbol* class_name, |
1196 // object hierarchy until loaded.] |
1196 TRAPS) { |
1197 |
|
1198 InstanceKlass* SystemDictionary::load_shared_class( |
|
1199 Symbol* class_name, Handle class_loader, TRAPS) { |
|
1200 InstanceKlass* ik = find_shared_class(class_name); |
1197 InstanceKlass* ik = find_shared_class(class_name); |
1201 // Make sure we only return the boot class for the NULL classloader. |
1198 // Make sure we only return the boot class. |
1202 if (ik != NULL && |
1199 if (ik != NULL && ik->is_shared_boot_class()) { |
1203 ik->is_shared_boot_class() && class_loader.is_null()) { |
1200 return load_shared_class(ik, Handle(), Handle(), THREAD); |
1204 Handle protection_domain; |
|
1205 return load_shared_class(ik, class_loader, protection_domain, THREAD); |
|
1206 } |
1201 } |
1207 return NULL; |
1202 return NULL; |
1208 } |
1203 } |
1209 |
1204 |
1210 // Check if a shared class can be loaded by the specific classloader: |
1205 // Check if a shared class can be loaded by the specific classloader: |
1492 // Search for classes in the CDS archive. |
1487 // Search for classes in the CDS archive. |
1493 InstanceKlass* k = NULL; |
1488 InstanceKlass* k = NULL; |
1494 { |
1489 { |
1495 #if INCLUDE_CDS |
1490 #if INCLUDE_CDS |
1496 PerfTraceTime vmtimer(ClassLoader::perf_shared_classload_time()); |
1491 PerfTraceTime vmtimer(ClassLoader::perf_shared_classload_time()); |
1497 k = load_shared_class(class_name, class_loader, THREAD); |
1492 k = load_shared_boot_class(class_name, THREAD); |
1498 #endif |
1493 #endif |
1499 } |
1494 } |
1500 |
1495 |
1501 if (k == NULL) { |
1496 if (k == NULL) { |
1502 // Use VM class loader |
1497 // Use VM class loader |