8185717: Make ModuleEntry->module() return an oop not a jobject

Change ModuleEntry::module() to return an oop and add a ModuleEntry::module_handle() that returns a jobject

Reviewed-by: shade, coleenp, lfoltan
This commit is contained in:
Harold Seigel 2017-08-08 09:53:52 -04:00
parent 2787fd2cd7
commit 1a92a2ad53
9 changed files with 22 additions and 19 deletions

View file

@ -603,9 +603,9 @@ char* Reflection::verify_class_access_msg(const Klass* current_class,
current_class_name, module_from_name, new_class_name,
module_to_name, module_from_name, module_to_name);
} else {
jobject jlm = module_to->module();
oop jlm = module_to->module();
assert(jlm != NULL, "Null jlm in module_to ModuleEntry");
intptr_t identity_hash = JNIHandles::resolve(jlm)->identity_hash();
intptr_t identity_hash = jlm->identity_hash();
size_t len = 160 + strlen(current_class_name) + 2*strlen(module_from_name) +
strlen(new_class_name) + 2*sizeof(uintx);
msg = NEW_RESOURCE_ARRAY(char, len);
@ -630,9 +630,9 @@ char* Reflection::verify_class_access_msg(const Klass* current_class,
current_class_name, module_from_name, new_class_name,
module_to_name, module_to_name, package_name, module_from_name);
} else {
jobject jlm = module_from->module();
oop jlm = module_from->module();
assert(jlm != NULL, "Null jlm in module_from ModuleEntry");
intptr_t identity_hash = JNIHandles::resolve(jlm)->identity_hash();
intptr_t identity_hash = jlm->identity_hash();
size_t len = 170 + strlen(current_class_name) + strlen(new_class_name) +
2*strlen(module_to_name) + strlen(package_name) + 2*sizeof(uintx);
msg = NEW_RESOURCE_ARRAY(char, len);