1729 // Returns true if the class's status has changed |
1729 // Returns true if the class's status has changed |
1730 bool MetaspaceShared::try_link_class(InstanceKlass* ik, TRAPS) { |
1730 bool MetaspaceShared::try_link_class(InstanceKlass* ik, TRAPS) { |
1731 assert(DumpSharedSpaces, "should only be called during dumping"); |
1731 assert(DumpSharedSpaces, "should only be called during dumping"); |
1732 if (ik->init_state() < InstanceKlass::linked) { |
1732 if (ik->init_state() < InstanceKlass::linked) { |
1733 bool saved = BytecodeVerificationLocal; |
1733 bool saved = BytecodeVerificationLocal; |
1734 if (!(ik->is_shared_boot_class())) { |
1734 if (ik->loader_type() == 0 && ik->class_loader() == NULL) { |
1735 // The verification decision is based on BytecodeVerificationRemote |
1735 // The verification decision is based on BytecodeVerificationRemote |
1736 // for non-system classes. Since we are using the NULL classloader |
1736 // for non-system classes. Since we are using the NULL classloader |
1737 // to load non-system classes during dumping, we need to temporarily |
1737 // to load non-system classes for customized class loaders during dumping, |
1738 // change BytecodeVerificationLocal to be the same as |
1738 // we need to temporarily change BytecodeVerificationLocal to be the same as |
1739 // BytecodeVerificationRemote. Note this can cause the parent system |
1739 // BytecodeVerificationRemote. Note this can cause the parent system |
1740 // classes also being verified. The extra overhead is acceptable during |
1740 // classes also being verified. The extra overhead is acceptable during |
1741 // dumping. |
1741 // dumping. |
1742 BytecodeVerificationLocal = BytecodeVerificationRemote; |
1742 BytecodeVerificationLocal = BytecodeVerificationRemote; |
1743 } |
1743 } |