8189123: More consistent classloading

Reviewed-by: acorn, ahgross, rhalade
This commit is contained in:
Harold Seigel 2017-11-07 16:07:36 -05:00 committed by Harold Seigel
parent 278672706d
commit f988f60dc8
3 changed files with 13 additions and 3 deletions

View file

@ -839,6 +839,11 @@ JVM_ENTRY(jclass, JVM_FindClassFromClass(JNIEnv *env, const char *name,
Handle h_prot (THREAD, protection_domain);
jclass result = find_class_from_class_loader(env, h_name, init, h_loader,
h_prot, true, thread);
if (result != NULL) {
oop mirror = JNIHandles::resolve_non_null(result);
Klass* to_class = java_lang_Class::as_Klass(mirror);
ClassLoaderData::class_loader_data(h_loader())->record_dependency(to_class);
}
if (log_is_enabled(Debug, class, resolve) && result != NULL) {
// this function is generally only used for class loading during verification.