diff -r edb65305d3ac -r fde3feaaa4ed src/hotspot/share/classfile/systemDictionary.cpp --- a/src/hotspot/share/classfile/systemDictionary.cpp Tue Mar 06 08:36:44 2018 +0100 +++ b/src/hotspot/share/classfile/systemDictionary.cpp Tue Mar 06 17:15:16 2018 -0500 @@ -150,9 +150,9 @@ CDS_ONLY(SystemDictionaryShared::initialize(CHECK);) } -ClassLoaderData* SystemDictionary::register_loader(Handle class_loader, TRAPS) { +ClassLoaderData* SystemDictionary::register_loader(Handle class_loader) { if (class_loader() == NULL) return ClassLoaderData::the_null_class_loader_data(); - return ClassLoaderDataGraph::find_or_create(class_loader, THREAD); + return ClassLoaderDataGraph::find_or_create(class_loader); } // ---------------------------------------------------------------------------- @@ -664,7 +664,7 @@ // Fix for 4474172; see evaluation for more details class_loader = Handle(THREAD, java_lang_ClassLoader::non_reflection_class_loader(class_loader())); - ClassLoaderData *loader_data = register_loader(class_loader, CHECK_NULL); + ClassLoaderData* loader_data = register_loader(class_loader); Dictionary* dictionary = loader_data->dictionary(); unsigned int d_hash = dictionary->compute_hash(name); @@ -989,7 +989,7 @@ // Create a new CLD for anonymous class, that uses the same class loader // as the host_klass guarantee(host_klass->class_loader() == class_loader(), "should be the same"); - loader_data = ClassLoaderData::anonymous_class_loader_data(class_loader(), CHECK_NULL); + loader_data = ClassLoaderData::anonymous_class_loader_data(class_loader); } else { loader_data = ClassLoaderData::class_loader_data(class_loader()); } @@ -1067,7 +1067,7 @@ DoObjectLock = false; } - ClassLoaderData* loader_data = register_loader(class_loader, CHECK_NULL); + ClassLoaderData* loader_data = register_loader(class_loader); // Make sure we are synchronized on the class loader before we proceed Handle lockObject = compute_loader_lock_object(class_loader, THREAD); @@ -2505,11 +2505,10 @@ } (*appendix_result) = Handle(THREAD, appendix); // the target is stored in the cpCache and if a reference to this - // MethodName is dropped we need a way to make sure the + // MemberName is dropped we need a way to make sure the // class_loader containing this method is kept alive. - // FIXME: the appendix might also preserve this dependency. ClassLoaderData* this_key = accessing_klass->class_loader_data(); - this_key->record_dependency(m->method_holder(), CHECK_NULL); // Can throw OOM + this_key->record_dependency(m->method_holder()); return methodHandle(THREAD, m); } }