mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8198313: Wrap holder object for ClassLoaderData in a WeakHandle
Use WeakHandle for ClassLoaderData::_holder so that is_alive closure is not needed Reviewed-by: rehn, kbarrett
This commit is contained in:
parent
21f636f3cf
commit
d187884156
13 changed files with 273 additions and 48 deletions
|
@ -1901,7 +1901,7 @@ void InstanceKlass::clean_weak_instanceklass_links(BoolObjectClosure* is_alive)
|
|||
}
|
||||
|
||||
void InstanceKlass::clean_implementors_list(BoolObjectClosure* is_alive) {
|
||||
assert(class_loader_data()->is_alive(is_alive), "this klass should be live");
|
||||
assert(class_loader_data()->is_alive(), "this klass should be live");
|
||||
if (is_interface()) {
|
||||
if (ClassUnloading) {
|
||||
Klass* impl = implementor();
|
||||
|
@ -3407,14 +3407,8 @@ void JNIid::verify(Klass* holder) {
|
|||
}
|
||||
}
|
||||
|
||||
oop InstanceKlass::klass_holder_phantom() {
|
||||
oop* addr;
|
||||
if (is_anonymous()) {
|
||||
addr = _java_mirror.ptr_raw();
|
||||
} else {
|
||||
addr = &class_loader_data()->_class_loader;
|
||||
}
|
||||
return RootAccess<IN_CONCURRENT_ROOT | ON_PHANTOM_OOP_REF>::oop_load(addr);
|
||||
oop InstanceKlass::holder_phantom() const {
|
||||
return class_loader_data()->holder_phantom();
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue