hotspot/src/share/vm/classfile/symbolTable.cpp
changeset 17846 68ef5934c097
parent 17845 246c16282ae8
child 18091 ddde9f0f414d
--- a/hotspot/src/share/vm/classfile/symbolTable.cpp	Mon May 27 12:56:34 2013 +0200
+++ b/hotspot/src/share/vm/classfile/symbolTable.cpp	Mon May 27 12:58:42 2013 +0200
@@ -737,7 +737,7 @@
   return result;
 }
 
-void StringTable::unlink(BoolObjectClosure* is_alive) {
+void StringTable::unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f) {
   // Readers of the table are unlocked, so we should only be removing
   // entries at a safepoint.
   assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
@@ -748,6 +748,9 @@
       assert(!entry->is_shared(), "CDS not used for the StringTable");
 
       if (is_alive->do_object_b(entry->literal())) {
+        if (f != NULL) {
+          f->do_oop((oop*)entry->literal_addr());
+        }
         p = entry->next_addr();
       } else {
         *p = entry->next();