< prev index next >
src/hotspot/share/classfile/systemDictionary.cpp
Print this page
@@ -446,11 +446,11 @@
TRAPS) {
// Now we have to call back to java to check if the initating class has access
JavaValue result(T_VOID);
LogTarget(Debug, protectiondomain) lt;
if (lt.is_enabled()) {
- ResourceMark rm;
+ ResourceMark rm(THREAD);
// Print out trace information
LogStream ls(lt);
ls.print_cr("Checking package access");
if (class_loader() != NULL) {
ls.print("class loader: ");
@@ -1174,11 +1174,11 @@
bool SystemDictionary::is_shared_class_visible(Symbol* class_name,
InstanceKlass* ik,
Handle class_loader, TRAPS) {
assert(!ModuleEntryTable::javabase_moduleEntry()->is_patched(),
"Cannot use sharing if java.base is patched");
- ResourceMark rm;
+ ResourceMark rm(THREAD);
int path_index = ik->shared_classpath_index();
ClassLoaderData* loader_data = class_loader_data(class_loader);
if (path_index < 0) {
// path_index < 0 indicates that the class is intended for a custom loader
// and should not be loaded by boot/platform/app loaders
@@ -1339,11 +1339,11 @@
// For boot loader, ensure that GetSystemPackage knows that a class in this
// package was loaded.
if (class_loader.is_null()) {
int path_index = ik->shared_classpath_index();
- ResourceMark rm;
+ ResourceMark rm(THREAD);
ClassLoader::add_package(ik->name()->as_C_string(), path_index, THREAD);
}
if (DumpLoadedClassList != NULL && classlist_file->is_open()) {
// Only dump the classes that can be stored into CDS archive
@@ -1363,23 +1363,25 @@
uint64_t cds_fp = ik->get_stored_fingerprint();
if (aot_fp != 0 && aot_fp == cds_fp) {
// This class matches with a class saved in an AOT library
ik->set_has_passed_fingerprint_check(true);
} else {
- ResourceMark rm;
+ if (log_is_enabled(Info, class, fingerprint)) {
+ ResourceMark rm(THREAD);
log_info(class, fingerprint)("%s : expected = " PTR64_FORMAT " actual = " PTR64_FORMAT, ik->external_name(), aot_fp, cds_fp);
}
}
+ }
return ik;
}
#endif // INCLUDE_CDS
InstanceKlass* SystemDictionary::load_instance_class(Symbol* class_name, Handle class_loader, TRAPS) {
if (class_loader.is_null()) {
- ResourceMark rm;
+ ResourceMark rm(THREAD);
PackageEntry* pkg_entry = NULL;
bool search_only_bootloader_append = false;
ClassLoaderData *loader_data = class_loader_data(class_loader);
// Find the package in the boot loader's package entry table.
< prev index next >