< prev index next >
src/share/vm/oops/instanceMirrorKlass.inline.hpp
Print this page
*** 58,70 ****
--- 58,79 ----
if (Devirtualizer<nv>::do_metadata(closure)) {
Klass* klass = java_lang_Class::as_Klass(obj);
// We'll get NULL for primitive mirrors.
if (klass != NULL) {
+ if (klass->oop_is_instance() && InstanceKlass::cast(klass)->is_anonymous()) {
+ // An anonymous class doesn't have its own class loader, sowhen handling
+ // the java mirror for an anonymous class we need to make sure its class
+ // loader data is claimed, this is done by calling do_cld explicitly.
+ // For non-anonymous classes the call to do_cld is made when the class
+ // loader itself is handled.
+ Devirtualizer<nv>::do_cld(closure, klass->class_loader_data());
+ } else {
Devirtualizer<nv>::do_klass(closure, klass);
}
}
+ }
oop_oop_iterate_statics<nv>(obj, closure);
return oop_size(obj);
}
< prev index next >