diff src/share/vm/oops/klass.cpp @ 3464:be4ca325525a

Merge.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 27 Jul 2011 17:32:44 -0700
parents 75a99b4f1c98 8ce625481709
children 33df1aeaebbf
line wrap: on
line diff
--- a/src/share/vm/oops/klass.cpp	Wed Jul 27 17:24:11 2011 -0700
+++ b/src/share/vm/oops/klass.cpp	Wed Jul 27 17:32:44 2011 -0700
@@ -454,6 +454,14 @@
       ik->unlink_class();
     }
   }
+  // Clear the Java vtable if the oop has one.
+  // The vtable isn't shareable because it's in the wrong order wrt the methods
+  // once the method names get moved and resorted.
+  klassVtable* vt = vtable();
+  if (vt != NULL) {
+    assert(oop_is_instance() || oop_is_array(), "nothing else has vtable");
+    vt->clear_vtable();
+  }
   set_subklass(NULL);
   set_next_sibling(NULL);
 }