mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
8213439: Run class initialization for boot loader classes with registered subgraph archiving entry field during CDS dump time
Run class initialization for boot classes with registered subgraph archiving entry fieldi(s) at CDS dump time. Reviewed-by: dholmes, iklam
This commit is contained in:
parent
9dbaf4936f
commit
a73856351a
2 changed files with 6 additions and 1 deletions
|
@ -886,6 +886,10 @@ void HeapShared::init_subgraph_entry_fields(ArchivableStaticFieldInfo fields[],
|
|||
Klass* k = SystemDictionary::resolve_or_null(klass_name, THREAD);
|
||||
assert(k != NULL && !HAS_PENDING_EXCEPTION, "class must exist");
|
||||
InstanceKlass* ik = InstanceKlass::cast(k);
|
||||
assert(InstanceKlass::cast(ik)->is_shared_boot_class(),
|
||||
"Only support boot classes");
|
||||
ik->initialize(THREAD);
|
||||
guarantee(!HAS_PENDING_EXCEPTION, "exception in initialize");
|
||||
|
||||
ArchivableStaticFieldFinder finder(ik, field_name);
|
||||
ik->do_local_static_fields(&finder);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue