8204970: Remaing object comparisons need to use oopDesc::equals()

Reviewed-by: eosterlund, zgu
This commit is contained in:
Roman Kennke 2018-07-25 21:47:40 +02:00
parent 86629a36f0
commit ca473200b7
2 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ private:
ciMetadata* create_new_metadata(Metadata* o);
static bool is_equal(NonPermObject* p, oop key) {
return p->object()->get_oop() == key;
return oopDesc::equals(p->object()->get_oop(), key);
}
NonPermObject* &find_non_perm(oop key);

View File

@ -307,7 +307,7 @@ void Modules::define_module(jobject module, jboolean is_open, jstring version,
oop loader = java_lang_Module::loader(module_handle());
// Make sure loader is not the jdk.internal.reflect.DelegatingClassLoader.
if (loader != java_lang_ClassLoader::non_reflection_class_loader(loader)) {
if (!oopDesc::equals(loader, java_lang_ClassLoader::non_reflection_class_loader(loader))) {
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
"Class loader is an invalid delegating class loader");
}