Skip to content

Commit

Permalink
Tighten up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
shipilev committed Oct 16, 2024
1 parent b3360db commit 7c6621b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/hotspot/share/cds/heapShared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,9 @@ void HeapShared::set_scratch_java_mirror(Klass* k, oop mirror) {
}

void HeapShared::remove_scratch_objects(Klass* k) {
// Before we remove the Java mirror from the table, we need to break the link
// from mirror to the Klass. Java mirror can still be alive, and it should
// not point to dead klass. See how InstanceKlass::deallocate_contents does it
// for normal mirrors.
// Klass is being deallocated. Java mirror can still be alive, and it should not
// point to dead klass. We need to break the link from mirror to the Klass.
// See how InstanceKlass::deallocate_contents does it for normal mirrors.
oop mirror = _scratch_java_mirror_table->get_oop(k);
if (mirror != nullptr) {
java_lang_Class::set_klass(mirror, nullptr);
Expand Down

0 comments on commit 7c6621b

Please sign in to comment.