< prev index next >
src/hotspot/share/oops/instanceKlass.cpp
Print this page
@@ -2302,10 +2302,13 @@
// Unlink the class
if (is_linked()) {
unlink_class();
}
+
+ _init_state = allocated;
+
{
MutexLocker ml(Compile_lock);
init_implementor();
}
@@ -2348,10 +2351,14 @@
array_klasses()->remove_java_mirror();
}
}
void InstanceKlass::restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain, TRAPS) {
+ // SystemDictionary::add_to_hierarchy() sets the init_state to loaded
+ // before the InstanceKlass is added to the the SystemDictionary. Make
+ // sure the current state is <loaded.
+ assert(!is_loaded(), "invalid init state");
set_package(loader_data, CHECK);
Klass::restore_unshareable_info(loader_data, protection_domain, CHECK);
Array<Method*>* methods = this->methods();
int num_methods = methods->length();
< prev index next >