8007725: NPG: Klass::restore_unshareable_info() triggers assert(k->java_mirror() == NULL)

Check for exception during SystemDictionary::resolve_instance_class_or_null() and clean up.

Reviewed-by: coleenp, acorn, hseigel, minqi
This commit is contained in:
Ioi Lam 2013-03-15 17:24:40 -04:00 committed by Coleen Phillimore
parent be1b5fc17e
commit 6f76ade8e1
5 changed files with 60 additions and 6 deletions

View file

@ -486,6 +486,12 @@ void Klass::oops_do(OopClosure* cl) {
}
void Klass::remove_unshareable_info() {
if (!DumpSharedSpaces) {
// Clean up after OOM during class loading
if (class_loader_data() != NULL) {
class_loader_data()->remove_class(this);
}
}
set_subklass(NULL);
set_next_sibling(NULL);
// Clear the java mirror