提交 c181c50f 编写于 作者: S shshahma

8147026: Convert an assert in ClassLoaderData to a guarantee

Summary: Guarantee is to ensure classloader is a valid oop will help catch the errors at an early stage rather than crashing the JVM later on in the GC
Reviewed-by: coleenp
上级 3e6a2a07
......@@ -40,7 +40,7 @@ inline ClassLoaderData* ClassLoaderData::class_loader_data(oop loader) {
inline ClassLoaderData *ClassLoaderDataGraph::find_or_create(Handle loader, TRAPS) {
assert(loader() != NULL,"Must be a class loader");
guarantee(loader() != NULL && loader()->is_oop(), "Loader must be oop");
// Gets the class loader data out of the java/lang/ClassLoader object, if non-null
// it's already in the loader_data, so no need to add
ClassLoaderData* loader_data= java_lang_ClassLoader::loader_data(loader());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册