989 } |
989 } |
990 Handle h_loader(THREAD, class_loader); |
990 Handle h_loader(THREAD, class_loader); |
991 Handle h_prot (THREAD, protection_domain); |
991 Handle h_prot (THREAD, protection_domain); |
992 jclass result = find_class_from_class_loader(env, h_name, init, h_loader, |
992 jclass result = find_class_from_class_loader(env, h_name, init, h_loader, |
993 h_prot, true, thread); |
993 h_prot, true, thread); |
994 if (result != NULL) { |
|
995 oop mirror = JNIHandles::resolve_non_null(result); |
|
996 Klass* to_class = java_lang_Class::as_Klass(mirror); |
|
997 ClassLoaderData* cld = ClassLoaderData::class_loader_data(h_loader()); |
|
998 cld->record_dependency(to_class, CHECK_NULL); |
|
999 } |
|
1000 |
994 |
1001 if (TraceClassResolution && result != NULL) { |
995 if (TraceClassResolution && result != NULL) { |
1002 // this function is generally only used for class loading during verification. |
996 // this function is generally only used for class loading during verification. |
1003 ResourceMark rm; |
997 ResourceMark rm; |
1004 oop from_mirror = JNIHandles::resolve_non_null(from); |
998 oop from_mirror = JNIHandles::resolve_non_null(from); |