hotspot/src/share/vm/asm/codeBuffer.cpp
changeset 14816 f2935b95cb54
parent 14633 58caa6fc3b7c
child 16368 713209c45a82
--- a/hotspot/src/share/vm/asm/codeBuffer.cpp	Fri Dec 07 10:55:16 2012 -0800
+++ b/hotspot/src/share/vm/asm/codeBuffer.cpp	Wed Dec 12 11:39:29 2012 -0500
@@ -496,21 +496,9 @@
   dest->verify_section_allocation();
 }
 
-// Anonymous classes need mirror to keep the metadata alive but
-// for regular classes, the class_loader is sufficient.
+// Append an oop reference that keeps the class alive.
 static void append_oop_references(GrowableArray<oop>* oops, Klass* k) {
-  if (k->oop_is_instance()) {
-    InstanceKlass* ik = InstanceKlass::cast(k);
-    if (ik->is_anonymous()) {
-      oop o = ik->java_mirror();
-      assert (o != NULL, "should have a mirror");
-      if (!oops->contains(o)) {
-        oops->append(o);
-      }
-      return;  // only need the mirror
-    }
-  }
-  oop cl = k->class_loader();
+  oop cl = k->klass_holder();
   if (cl != NULL && !oops->contains(cl)) {
     oops->append(cl);
   }